Skip to content

add debug lib to CURL to avoid 'warning LNK4098: defaultlib 'MSVCRT' …#185

Open
cbielow wants to merge 1 commit into
masterfrom
debug_curl
Open

add debug lib to CURL to avoid 'warning LNK4098: defaultlib 'MSVCRT' …#185
cbielow wants to merge 1 commit into
masterfrom
debug_curl

Conversation

@cbielow

@cbielow cbielow commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

…conflicts with use of other libs

Summary by CodeRabbit

  • Documentation

    • Added guidance for working with third-party libraries in the contrib tree, including build expectations, configuration consistency, and troubleshooting notes for Windows builds.
  • Bug Fixes

    • Improved MSVC builds by ensuring both Debug and Release versions of libcurl are built and installed when required, reducing configuration mismatches and related build failures.

@cbielow cbielow requested a review from timosachsenberg July 3, 2026 08:40
@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds an AGENTS.md document specifying contrib build conventions for MSVC Debug/Release libraries, and updates curl.cmake to build and install a Debug variant of libcurl prior to the Release build, with logging and failure handling on MSVC generators.

Changes

MSVC Debug Build Convention

Layer / File(s) Summary
Build conventions documentation
AGENTS.md
Adds guidance for building/installing Debug and Release variants on MSVC, CRT mismatch troubleshooting, and macro patterns for library scripts.
Curl Debug build step
libraries.cmake/curl.cmake
Adds an MSVC-only block that builds and installs the Debug configuration of libcurl via execute_process, logging output and failing with FATAL_ERROR on error, before the existing Release build.

Poem

A rabbit hops through Debug and Release,
Building twice so CRT bugs cease,
AGENTS.md lights the way,
Curl now builds both configs today,
Thump thump — contrib builds in peace! 🐇🔧

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding a Debug CURL library to avoid the MSVCRT linker warning.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch debug_curl

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
AGENTS.md (1)

25-28: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Add a language hint to the fenced code block.

Static analysis (markdownlint MD040) flags this fence for missing a language specifier.

📝 Proposed fix
-```
+```text
 LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs;
        use /NODEFAULTLIB:library
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @AGENTS.md around lines 25 - 28, Add a language specifier to the fenced block
in AGENTS.md so the markdownlint MD040 warning is resolved; update the fence
around the LINK warning snippet to use an appropriate hint such as text, keeping
the content unchanged and locating it by the AGENTS.md fenced example.


</details>

<!-- cr-comment:v1:e39d491867020cbb4a8e074c -->

_Source: Linters/SAST tools_

</blockquote></details>

</blockquote></details>

<details>
<summary>🤖 Prompt for all review comments with AI agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @AGENTS.md:

  • Around line 25-28: Add a language specifier to the fenced block in AGENTS.md
    so the markdownlint MD040 warning is resolved; update the fence around the LINK
    warning snippet to use an appropriate hint such as text, keeping the content
    unchanged and locating it by the AGENTS.md fenced example.

</details>

---

<details>
<summary>ℹ️ Review info</summary>

<details>
<summary>⚙️ Run configuration</summary>

**Configuration used**: Organization UI

**Review profile**: CHILL

**Plan**: Pro

**Run ID**: `be1c30f2-5b07-469b-aea4-61215f1130d4`

</details>

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between e127deafd303960ef036903bef3f987e5b689017 and 5ca407e5f69443034996d2f51377ea062bf5d2c8.

</details>

<details>
<summary>📒 Files selected for processing (2)</summary>

* `AGENTS.md`
* `libraries.cmake/curl.cmake`

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

@timosachsenberg timosachsenberg requested a review from pjones July 3, 2026 09:16
@timosachsenberg

Copy link
Copy Markdown
Contributor

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants