User forums > General (but related to Code::Blocks)
Microsoft C/C++ compiller
lbertolotti:
What is the best way of configuring a Microsoft C/C++ compiller on Code::Blocks?
I'm getting:
main.o : fatal error LNK1143: invalid or corrupt file: no symbol for COMDAT section 0xB
oBFusCATed:
Try reading this: http://wiki.codeblocks.org/index.php/FAQ-Compiling_(errors)#Q:_How_do_I_troubleshoot_a_compiler_problem.3F
Also next time when you ask for help please provide more details like:
1. full build log
2. version information for cb, compiler, os, etc
3. which compiler you've set up inside the cb's compiler settings
lbertolotti:
1.
--- Code: ----------------- Build: Debug in example_mic (compiler: Microsoft Compiller)---------------
link.exe /nologo /LIBPATH:"..\..\..\..\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\ucrt" /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include" /out:bin\Debug\example_mic.exe obj\Debug\main.obj /debug
LINK : fatal error LNK1104: cannot open file 'msvcprtd.lib'
Process terminated with status 1104 (0 minute(s), 0 second(s))
1 error(s), 0 warning(s) (0 minute(s), 0 second(s))
--- End code ---
2.
Code::Blocks 16.01
Windows 10
3.
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC
oBFusCATed:
This is obviously wrong: /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include"
You need to pass path where libraries are stored and not where the include files are stored.
Interestingly enough there is no guide how to set vc++ in the wiki any more. :( :o
lbertolotti:
--- Quote from: oBFusCATed on July 02, 2017, 09:43:47 am ---This is obviously wrong: /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include"
You need to pass path where libraries are stored and not where the include files are stored.
Interestingly enough there is no guide how to set vc++ in the wiki any more. :( :o
--- End quote ---
Now I'm gettings this:
--- Code: ----------------- Clean: Debug in example_mic (compiler: Microsoft Compiller)---------------
Cleaned "example_mic - Debug"
-------------- Build: Debug in example_mic (compiler: Microsoft Compiller)---------------
cl.exe /nologo /W3 /EHsc /MDd /Zi /D_DEBUG /I"..\..\..\..\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\ucrt" /I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\lib" /c main.cpp /Foobj\Debug\Users\lucao\Desktop\example_mic\main.obj
main.cpp
main.cpp(1): fatal error C1083: Cannot open include file: 'iostream': No such file or directory
Process terminated with status 2 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))
--- End code ---
Navigation
[0] Message Index
[#] Next page
Go to full version