I know this has come up before, but I didn't see a resolution. Forum rules claim that if the compiler has problems, don't bother the codeblocks forum about it. However, I think I need to know where, and how codeblocks builds the command line arguments to cl.exe. It seems that the Microsoft cl.exe from Community Edition 2022 needs a different command line argument presentation than the 2010 compiler, which is the last Microsoft compiler supported in Codeblocks. I used advise on this forum to redirect Codeblocks into using the paths for Community 2022, after selecting Microsoft 2010 in the drop down list. This is the build log:
cl.exe /nologo /W3 /EHsc /Zi /D_DEBUG /MDd /TP /GA /I"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\bin\Hostx64\x64" /I"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\include" /I"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\bin" /I"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\" /IC:\Users\stan\Documents\codeblocks\new2 /c main.cpp /Foobj\Debug\main.obj
link.exe /nologo /LIBPATH:"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\Llvm\lib" /out:bin\Debug\new2.exe msvcrtd.lib msvcprtd.lib obj\Debug\main.obj /DEBUG
cl : Command line error D8003 : missing source filename
Process terminated with status 2 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))
I do hope I'm not blown off with "USE THE 2010 COMPILER!"