Update CMakeLists.txt to fix link warning LNK4098. - #347
Open
krishna116 wants to merge 1 commit into
Open
Conversation
[Englisth] I encountered this issue while using the statically compiled utf8proc (version 2.11.3): LINK: warning LNK4098: The default library “MSVCRT” conflicts with other libraries; please use /NODEFAULTLIB:library Here is the solution provided by AI: When you encounter the message “The default library ‘MSVCRT’ conflicts with other libraries” while using a static C++ library, it is usually because the static library is linked to a C runtime library (CRT) that is incompatible with your project. To resolve this issue, you need to ensure that the static library does not statically link the CRT, but instead depends on the version of the CRT used by your project. [Chinese] 我使用静态编译的utf8proc(version 2.11.3)遇到这个问题:LINK : warning LNK4098: 默认库“MSVCRT”与其他库的使用冲突;请使用 /NODEFAULTLIB:library 以下是AI给出的解决方案: 在使用静态C++库时遇到“默认库‘MSVCRT’与其他库的使用冲突”提示,通常是因为该静态库链接了与您的项目不兼容的C运行时库(CRT)。要解决这个问题,您需要确保静态库不静态链接CRT,而是依赖于您的项目所使用的CRT版本。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[English]
I encountered this issue while using the statically compiled utf8proc (version 2.11.3): LINK: warning LNK4098: The default library “MSVCRT” conflicts with other libraries; please use /NODEFAULTLIB:library
Here is the solution provided by AI:
When you encounter the message “The default library ‘MSVCRT’ conflicts with other libraries” while using a static C++ library, it is usually because the static library is linked to a C runtime library (CRT) that is incompatible with your project. To resolve this issue, you need to ensure that the static library does not statically link the CRT, but instead depends on the version of the CRT used by your project.
[Chinese]
我使用静态编译的utf8proc(version 2.11.3)遇到这个问题:LINK : warning LNK4098: 默认库“MSVCRT”与其他库的使用冲突;请使用 /NODEFAULTLIB:library
以下是AI给出的解决方案:
在使用静态C++库时遇到“默认库‘MSVCRT’与其他库的使用冲突”提示,通常是因为该静态库链接了与您的项目不兼容的C运行时库(CRT)。要解决这个问题,您需要确保静态库不静态链接CRT,而是依赖于您的项目所使用的CRT版本。