How to use /NODEFAULTLIBS option in compilation?

女生的网名这么多〃 提交于 2019-12-13 12:32:01

问题


I have a solution explorer contains 2 projects. For one project I have enabled /clr with /mdd. For parent project I have /mtd and no clr support. When I compile this I get two linker errors including the below one:

Link warning link 4098:Default lib can conflict with other lib use /NODEFAULTLIBS library

So my question is how to use /NODEFAULTLIBS in compilation.

Thanks in advance.


回答1:


First you need to work out which library is causing the conflict, if you can. Does the link warning tell you anything?

Then you need to open the property pages for this project, and go to Linker -> Command Line. In the 'Additional Options' area, type:

/NODEFAULTLIB:xxx.lib

where xxx.lib is the conflicting library. However, if you couldn't work out which library it is, try just:

/NODEFAULTLIB



来源:https://stackoverflow.com/questions/944481/how-to-use-nodefaultlibs-option-in-compilation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!