User forums > Help
Linking with the VC 11.0 linker: unrecognized option '/DEBUG'
whisp:
When building my project i get the following warning:
LINK||warning LNK4044: unrecognized option '/DEBUG'; ignored|
Recently i switched from MinGW GCC to the VC 11.0 compiler. I didn't have the selection in the Code::Blocks compiler list, so i copied the Microsoft Visual C++ 2010 Compiler settings and replaced the "10.0" in the directories (e.g. the compiler installation directory) with "11.0". Compiling works fine, but when linking i get the above mentioned warning. /DEBUG is the linker flag of the preset Code::Blocks compiler flag "Produce debugging symbols /Zi" and officially an option of the VC 11.0 linker (http://msdn.microsoft.com/en-us/library/y0zzbyt4%28v=vs.110%29.aspx).
From the build log:
--- Code: ---cl.exe /nologo /EHs /W3 /Zi /I"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include" /I"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include" /c helper.cpp /Foobj\Debug\helper.obj
link.exe /lib /nologo /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\lib" /LIBPATH:"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib" /out:bin\Debug\libHelper.lib obj\Debug\helper.obj /DEBUG
helper.cpp
LINK : warning LNK4044: unrecognized option '/DEBUG'; ignored
--- End code ---
Code::Blocks SVN 9455.
Anyone has a clue how i can get this to work (without just removing it)? Any hints appreciated.
whisp
whisp:
Anyone who can confirm this as a Code::Blocks problem for VC 11.0? Or, in contrary, that he uses the VC 11.0 linker in Code::Blocks without this problem? Thanks!
Btw, i'm using SVN 9455.
Alpha:
If you execute the same command in the console, do you still receive the warning?
whisp:
Thanks for that hint. I just tried it in the windows command console and got the same error.
It turned out that the problem isn't the /DEBUG option, despite the error message, but the /lib option. It is not an option of VC 11.0 link.exe and if i use the /dll option instead (respectively set the build target type in Code::Blocks to dynamic library) it works fine. I don't know which option is needed to create a static library, yet.
According to http://msdn.microsoft.com/en-us/library/y0zzbyt4%28v=vs.100%29.aspx it's neither an option for the VC 10.0 linker.
oBFusCATed:
--- Quote from: whisp on January 20, 2014, 11:57:54 pm ---Thanks for that hint. I just tried it in the windows command console and got the same error.
--- End quote ---
It is not an error, but a warning it is a bit different.
Navigation
[0] Message Index
[#] Next page
Go to full version