News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Strange problem with compiler

Started by MoniqueDumont, January 21, 2014, 06:28:23 PM

Previous topic - Next topic

MoniqueDumont

Hello,
I am running Code::Blocks version 13.13 on windows 8.
(8.0). The compiler I use is GNU GCC compiler.

When I open a .cbp, Code::Blocks show this error :




but the fact is that i'm not using Microsoft Visual C++ Toolkit 2003, as you can see on the following pictures, i'm running GNU GCC Compiler, set as default :







Build log:

Probably the toolchain path within the compiler options is not setup correctly?! (Do you have a compiler installed?)
Goto "Settings->Compiler...->Global compiler settings->Microsoft Visual C++ Toolkit 2003->Toolchain executables" and fix the compiler's setup.
Skipping...
Nothing to be done (all items are up-to-date).


Thank you for your attention.

Jenna

Are yo sure, that neither the project nor any target inside uses MSVC ?

MoniqueDumont

When I set GNU GCC or any of the others compilers as default in Settings > Compiler, and click on OK, Code::Blocks sends me the error about MSVC.
So I tried as you said, to look if nothing's using MSVC. In Project > Build Options > Debug/Release, I set GNU GCC and get a new error :

My build messages are :
||=== Build: Debug in Project title (compiler: GNU GCC Compiler) ===|
\W3||No such file or directory|
\Zi||No such file or directory|
\D_DEBUG||No such file or directory|
\MDd||No such file or directory|
||=== Build failed: 4 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|


And my build log is :
mingw32-gcc.exe: error: /W3: No such file or directory
mingw32-gcc.exe: error: /Zi: No such file or directory
mingw32-gcc.exe: error: /D_DEBUG: No such file or directory
mingw32-gcc.exe: error: /MDd: No such file or directory
Process terminated with status 1 (0 minute(s), 0 second(s))
4 error(s), 0 warning(s) (0 minute(s), 0 second(s))

stahta01

So, the project was using MSVC.

You need to fix the project or install MSVC (and configure CB toolchain).

Make a decision.

Tim S.


C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

MoniqueDumont

Yes but the upper logs are the logs I get when I set GNU GCC in the project's build options. Is that what you meant ? What  do these logs mean ?

stahta01

#5
Quote from: MoniqueDumont on January 21, 2014, 10:39:00 PM
Yes but the upper logs are the logs I get when I set GNU GCC in the project's build options. Is that what you meant ? What  do these logs mean ?

Have you made the decision? If yes, what did you decide to do?

Edit: To fix the project; remove the MSVC options that are in the Compiler/Linker other options section in the project.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

MoniqueDumont

Okay now I'm getting

||=== Build: Debug in Problem 22 (compiler: GNU GCC Compiler) ===|
ld.exe||cannot find -lmsvcrtd.lib|
ld.exe||cannot find -lmsvcprtd.lib|
||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|


I removed the options here :



and in Debug/Release, is that what you meant ?

stahta01

#7
Quote from: MoniqueDumont on January 21, 2014, 11:17:35 PM
Okay now I'm getting

||=== Build: Debug in Problem 22 (compiler: GNU GCC Compiler) ===|
ld.exe||cannot find -lmsvcrtd.lib|
ld.exe||cannot find -lmsvcprtd.lib|
||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|


I removed the options here :


and in Debug/Release, is that what you meant ?

Yes, for the Compiler "other options"

Also, you need to check the "Linker Settings" other options and remove the libs not supplied by your MinGW GCC.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

MoniqueDumont

Quote from: stahta01 on January 22, 2014, 12:54:49 AM
Yes, for the Compiler "other options"

Also, you need to check the "Linker Settings" other options and remove the libs not supplied by your MinGW GCC.

Tim S.


I did remove Linker Options too, and I get the errors from the previous post.

stahta01

#9
Quote from: MoniqueDumont on January 22, 2014, 01:02:38 AM
Quote from: stahta01 on January 22, 2014, 12:54:49 AM
Yes, for the Compiler "other options"

Also, you need to check the "Linker Settings" other options and remove the libs not supplied by your MinGW GCC.

Tim S.


I did remove Linker Options too, and I get the errors from the previous post.

As I said remove the libs in the error you posted from the Linker Settings!

Edit2: You posted a picture of the "Compiler Settings" look to the right and you should see the Linker Settings in the Project Build Options.

Edit: "-lmsvcrtd.lib" A lib that needs removed; likely called "msvcrtd.lib" in the linker settings screen.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

MoniqueDumont

Alright thank you very much it works now !