Author Topic: [Solved] - Code::Blocks refuses to compile  (Read 5555 times)

Offline NomadShippo

  • Single posting newcomer
  • *
  • Posts: 3
[Solved] - Code::Blocks refuses to compile
« on: November 26, 2013, 07:04:33 pm »
Hello all,

  I seem to have encountered a bit of an issue immediately after installing codeblocks-12.11mingw-setup.exe.Every time I try running the "Hello" program included in the installation I get an error message saying

"Hello - Release": The compiler's setup (Microsoft Visual C++ 2005/2008) is invalid, so Code::Blocks cannot find/run the compiler.
Probably the toolchain path within the compiler options is not setup correctly?!
Goto "Settings->Compiler and debugger...->Global compiler settings->Microsoft Visual C++ 2005/2008->Toolchain executables" and fix the compiler's setup.
Skipping...
Nothing to be done (all items are up-to-date).

The compiler I have set to default is the gnu gcc compiler,and I have checked the toolchain paths for it to ensure everything there is correct and have also tried the "reset defaults" to see if that fixes anything.While I cannot seem to find the install path for Microsoft Visual C++ 2005/2008 I have verified that my computer has the various versions of each installed.

I've been trying to figure this out for about an hour to no avail,and thus I come to you guys in hopes that someone here might be able to help.
« Last Edit: November 26, 2013, 07:42:10 pm by NomadShippo »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10357
Re: Code::Blocks refuses to compile
« Reply #1 on: November 26, 2013, 07:12:17 pm »
What is the compiler used for your project/target. You can check it in Project -> Build options.
<debugger plugin maintainer>
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline NomadShippo

  • Single posting newcomer
  • *
  • Posts: 3
Re: Code::Blocks refuses to compile
« Reply #2 on: November 26, 2013, 07:23:26 pm »
It was apparently a set to MSVisual,and after changing it to Gnu GCC  and rebuilding I get the following:

\W3         No such file or directory
\EHsc       No such file or directory
\Ox          No such file or directory
\DNDEBUG No such file or directory
\MT         No such file or directory

,and in an additional popup it states that it cannot find the MSVisual compiler.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10357
Re: Code::Blocks refuses to compile
« Reply #3 on: November 26, 2013, 07:25:21 pm »
The best thing you could do is to recreate the project from scratch and make sure you select the GCC as the compiler for the project.

You can manually clean your project, but it might take too much time.
If you're interested you can remove the option in Build options -> Compiler -> Other options...
<debugger plugin maintainer>
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline NomadShippo

  • Single posting newcomer
  • *
  • Posts: 3
Re: Code::Blocks refuses to compile
« Reply #4 on: November 26, 2013, 07:30:25 pm »
That seems to do it.Thank you for your help.I am interested in learning to clean my future projects manually should I encounter a similar issue in something larger.Do you perhaps have a link to something that can tell me more about that?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10357
Re: [Solved] - Code::Blocks refuses to compile
« Reply #5 on: November 26, 2013, 07:45:32 pm »
Read the manual and the wiki. There is plenty of information that could help.
<debugger plugin maintainer>
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline koder

  • Single posting newcomer
  • *
  • Posts: 1
Re: [Solved] - Code::Blocks refuses to compile
« Reply #6 on: November 10, 2017, 03:37:33 pm »
I also had this problem when creating project,  choosing Visual Studio C++ that don't worked. After changing compiler to gnu gcc there was error like w3 ...
From settings, build options I had make all changes what needed but this error was stay. So I had decide to edit project file .cbp and I found there:
Code: [Select]
<Compiler>
    <Add option="W3" />
</Compiler>
and instead W3 changed to -Wall as it was in another project file with correct build options.
Code: [Select]
<Compiler>
<Add option="-Wall" />
</Compiler>
That is all, after all works fine!