Author Topic: Strange problem with compiler  (Read 8635 times)

Offline MoniqueDumont

  • Single posting newcomer
  • *
  • Posts: 6
Strange problem with compiler
« on: January 21, 2014, 06:28:23 pm »
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:
Code: [Select]
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.

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Strange problem with compiler
« Reply #1 on: January 21, 2014, 07:34:12 pm »
Are yo sure, that neither the project nor any target inside uses MSVC ?

Offline MoniqueDumont

  • Single posting newcomer
  • *
  • Posts: 6
Re: Strange problem with compiler
« Reply #2 on: January 21, 2014, 09:53:09 pm »
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 :
Code: [Select]
||=== 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 :
Code: [Select]
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))

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6677
    • My Best Post
Re: Strange problem with compiler
« Reply #3 on: January 21, 2014, 10:27:01 pm »
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++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline MoniqueDumont

  • Single posting newcomer
  • *
  • Posts: 6
Re: Strange problem with compiler
« Reply #4 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 ?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6677
    • My Best Post
Re: Strange problem with compiler
« Reply #5 on: January 21, 2014, 10:41:52 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.
« Last Edit: January 21, 2014, 10:50:49 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline MoniqueDumont

  • Single posting newcomer
  • *
  • Posts: 6
Re: Strange problem with compiler
« Reply #6 on: January 21, 2014, 11:17:35 pm »
Okay now I'm getting

Code: [Select]
||=== 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 ?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6677
    • My Best Post
Re: Strange problem with compiler
« Reply #7 on: January 22, 2014, 12:54:49 am »
Okay now I'm getting

Code: [Select]
||=== 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.
« Last Edit: January 22, 2014, 12:58:10 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline MoniqueDumont

  • Single posting newcomer
  • *
  • Posts: 6
Re: Strange problem with compiler
« Reply #8 on: January 22, 2014, 01:02:38 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.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6677
    • My Best Post
Re: Strange problem with compiler
« Reply #9 on: January 22, 2014, 01:09:44 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.
« Last Edit: January 22, 2014, 01:19:34 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline MoniqueDumont

  • Single posting newcomer
  • *
  • Posts: 6
Re: Strange problem with compiler
« Reply #10 on: January 22, 2014, 01:31:40 am »
Alright thank you very much it works now !