Author Topic: Need help with getting compiler  (Read 4378 times)

ghyng_11

  • Guest
Need help with getting compiler
« on: April 01, 2009, 06:07:18 am »
I tired downloading the suggested codeblocks-8.02mingw-setup.exe which i thought would also give me GNU GCC Compiler but it says that i dont  have it and when i try to run a project it says invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!].

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Need help with getting compiler
« Reply #1 on: April 01, 2009, 06:29:37 am »
I tired downloading the suggested codeblocks-8.02mingw-setup.exe which i thought would also give me GNU GCC Compiler but it says that i dont  have it and when i try to run a project it says invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!].
codeblocks-8.02mingw-setup.exe has a mingw package bundled. As far I can remember, it was located in your codeblocks installed folder/Mingw/XXX.

If you have more than one mingw package in your system, it it prone to have  compiler problems. So uninstall the other ones, and keep only one MinGW.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Need help with getting compiler
« Reply #2 on: April 01, 2009, 08:12:44 am »
I tired downloading the suggested codeblocks-8.02mingw-setup.exe which i thought would also give me GNU GCC Compiler but it says that i dont  have it and when i try to run a project it says invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!].

Make sure there is a MinGW subfolder in your codeblocks install directory.

If it is not there (you might have accidently unchecked to install MinGW compiler suite), reinstall C::B.
If it is there open "Settings... -> Compiler and debugger... -> Global compiler settings -> GNU GCC Compiler -> Toolchain executables" and try to run the autodetection.

If it does not find the correct directory, try to add it manually, add only the base folder of gcc, the one including the bin directory, not the bin-directory itself.

ghyng_11

  • Guest
Re: Need help with getting compiler
« Reply #3 on: April 02, 2009, 12:07:50 am »
I got it to auto detect thx for the help!!!!
« Last Edit: April 02, 2009, 12:11:58 am by ghyng_11 »