开发者

Linker problem in Release when trying to add GLUI library to project

开发者 https://www.devze.com 2023-01-21 08:40 出处:网络
I try to add the GLUI library to my project. Compiling in Debug mode runs fine. But if I compile in Release, it gives me a bunch of LNK2005 errors saying things like:

I try to add the GLUI library to my project. Compiling in Debug mode runs fine. But if I compile in Release, it gives me a bunch of LNK2005 errors saying things like:

error LNK2005: _realloc already defined in Libcmt.lib(realloc.obj)

o开发者_如何学Pythonk - i already got some similar Linker problems before because I use both CRT and MFC in my app but i could resolve this problem using this guide: http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q148/6/52.asp&NoWebContent=1

therefore in my Project settings in the Linker->Input panel i have

additional dependencies: Nafxcw.lib Libcmt.lib
ignore libraries: Nafxcw.lib;Libcmt.lib

so - this used to work fine. but now that I added the glui32.lib (it actually gets loaded in the glui.h header using a #pragma statement) to my project, i get those linker errors.

Any advise on what I can do?

Thanks!


There is one linker option available in Visual Studio to supress these kind of linker errors. I mean, if the definition already exist in some other library it will give these kind of errors. Please refer MSDN for visual stuio linker options.

0

精彩评论

暂无评论...
验证码 换一张
取 消