Author Topic: Can't find compiler executable in your search path...  (Read 31636 times)

royalbox

  • Guest
Can't find compiler executable in your search path...
« on: September 16, 2005, 06:17:32 pm »
Hello.
I've set code::blocks up to use the MS compiler but am still getting the error when compiling:
"Can't find compiler executable in your search path for GNU GCC compiler"

Do I still need to install code::blocks with the MINGW compiler? I had this installed and it worked. I decide I would stick with code::block and uninstalled my other compilers, had a bit of a cleanout, and re-installed code:blocks without the MINGW compiler.

Any ideas?

Many thanks.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Can't find compiler executable in your search path...
« Reply #1 on: September 16, 2005, 07:25:42 pm »
You do not need MinGW to use the Microsoft compiler.

The error message you cite looks like you have set MinGW as your default compiler or as the compiler to be used in the project (or both). In that case, the IDE will try to run the GNU compiler rather than the MSVC one, and since that is not installed, it will of course not find it.

Make sure that
a) your MSVC compiler is installed correctly (I assume that is the case)
b) both under Compiler -> Compiler options as well as under your project options, it says "Microsoft Visual C++" under "selected compiler" on top
c)  under Compiler -> Compiler options, the "Programs" tab lists the correct locations of your build tools - if it does not, try "auto-detect", if that still does not work, enter the location by hand

Then it should find the correct executables.

To preempt another pitfall with MSVC, please make sure you have the platform SDK downloaded, too, or else you won't be able to build Windows programs. The "normal" MSVC package that you download from the net does not contain that.
   
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

royalbox

  • Guest
Re: Can't find compiler executable in your search path...
« Reply #2 on: September 16, 2005, 07:55:34 pm »
Thomas,
Thanks a lot. The problem was under the projects options. It said that the selected compiler was the MS one until I clicked on "default" in the tree on the left, which then showed the GNU one. I got other errors I need to sort out but at least that's cleared that one up.

Thanks again.

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Can't find compiler executable in your search path...
« Reply #3 on: September 17, 2005, 04:37:18 am »
I think we should get rid of that "default compiler" since it's annoying and confusing. How about a dialog like this:

Please choose the compiler you'd like for this target:

* MinGW
* MSVC
* etc

[] Use this compiler for all targets (don't ask again for this project)

See, if Code::Blocks comes with MinGW, it'll use this as the "default", and that's not what MSVC users would want. So getting rid of the "default" option would be better. Of course, saving the last chosen option for future projects is required.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Can't find compiler executable in your search path...
« Reply #4 on: September 17, 2005, 11:51:10 am »
Not really needed.
Just a global setting for the default compiler, sounds enough.
Also, don't forget that in the CVS version, the new project wizard already creates the project using the default compiler setting. So, no confusion anymore...
Be patient!
This bug will be fixed soon...