Author Topic: Code::Blocks under Vista  (Read 12202 times)

stankon

  • Guest
Code::Blocks under Vista
« on: October 25, 2007, 12:09:26 am »
I was wondering if Code::Blocks is compatible with Windows Vista. I downloaded it and installed it, and when I tried to compile my project it just failed. SO far I haven't found any c language compiler that is compatible with Vista. Help, anyone?

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Code::Blocks under Vista
« Reply #1 on: October 25, 2007, 12:36:15 am »
If you go to http://forums.codeblocks.org/i and search for Vista you get about 4 pages of answers.
It seems to be possible to make Code::Blocks, MinGW32 and even wxWidgets afaik to work on Vista, but it's not as easy as on WinXP.
There is also wiki-page about MinGW and Vista: http://wiki.codeblocks.org/index.php?title=Installing_MinGW_with_Vista

Offline Grom

  • Almost regular
  • **
  • Posts: 206
Re: Code::Blocks under Vista
« Reply #2 on: October 25, 2007, 04:48:26 am »
Install the MinGW 4.2.2 and no problem at all.
gcc+winXP+suse.

stankon

  • Guest
Re: Code::Blocks under Vista
« Reply #3 on: October 26, 2007, 12:06:27 am »
Well I've installed minGW just like what stahta01 advised newbie0815, see http://forums.codeblocks.org/index.php/topic,5231.msg40776.html#msg40776

I installed mingw in C:\mingw, Code::Blocks in C:\CodeBlocks. I tried the programme and when compiling, it displayed the following error message:

Switching to target: default
Compiling: main.c
mingw32-gcc.exe: installation problem, cannot exec `cc1': No such file or directory
Process terminated with status 1 (0 minutes, 0 seconds)

Any ideas what I can do?

Offline codeur

  • Multiple posting newcomer
  • *
  • Posts: 113
    • Code::Blocks EDU-Portable
Re: Code::Blocks under Vista
« Reply #4 on: October 26, 2007, 04:31:52 am »
I have no personal experience with Vista, but have you tried the troubleshooting advice at the bottom of the Vista installation wiki?
More particularly check the advice about adding paths to the "toolchain executables" and providing the full paths to each program.
----------------- snip -----------
Trouble shooting

If this does not work out for you there is some advice to figure it out on your own:

    * If there is a file not found by MinGW use your search function to look for it, and add it where it belongs
          o If it's an executeable (.exe) add it to the "additional paths" under "toolchain executeables"
          o If it's a header (.h, .hpp or without extension) add it to "compiler" under "search directories"
          o If it's a library (.o, .a) add it to "linker" under "search directories"
    * Compile with the -v flag. You can do this by simply adding -v to "Build options" -> "Compiler" -> "Other options"
    * Try entering the complete path to each program (for example, changing "mingw32-g++.exe" to "D:\toolkits\MinGW513\bin\mingw32-g++.exe"). This may allow projects to be compiled, regardless of which partition and folder MinGW is installed to. See this forum thread for more details.
---------------------------snip-------------
... but I have my doubts:
These fixes may enable compilation, but depending on your version of MinGW, they may leave some issues with compilation and runtime errors as the Vista problem was a thorny issue with several ramifications.

An easy-to-install (and supposedly more complete) solution to the MinGW-Vista problem has been presented a couple of week ago by the maintainers of MAME. It may be advisable to uninstall your version of MinGW and install the MinGW package offered on http://mamedev.org/tools/index.html instead. It uses the very recent GCC 4.2.1 port.

That version is said to contain the necessary fixes to allow MinGW to work on Vista. As it is the second version of these tools, it is likely to be a tried and tested version.

Once again, this information is only the result of searches on the net. It makes sense, but I have not tried it myself as I do not have access to Vista. Please tell us how you go.
« Last Edit: October 26, 2007, 09:31:15 am by codeur »

Offline ZekeDragon

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: Code::Blocks under Vista
« Reply #5 on: October 27, 2007, 12:10:26 am »
To Stankon:

The way to fix your problem, because I faced it as well, is to go to "Settings > Compiler and debugger..." then select the "Toolchain executables" tab, and then "Additional paths" sub-tab, and add "C:\MinGW\libexec\gcc\mingw32\3.4.5" to there.  Should work no problem then.

Otherwise, yes... MinGW, Code::Blocks, and even wxWidgets are compatible with Vista.  It's just a headache.  While I never did it, it might also help to change the compatibility options for working with XP.
I broke it again.

stankon

  • Guest
Re: Code::Blocks under Vista
« Reply #6 on: October 29, 2007, 11:20:59 am »
hi,

for all that have helped and / or advised me, thanks a lot!
i've just found the solution to my vista problem, and for those who face the same problem as me, do this. it worked for me, so i suppose it would work for you too!

you'll just have to displace the following files to the indicated folder:

C:\MinGW\libexec\gcc\mingw32\3.4.5\cc1.exe           to         C:\MinGW\bin\cc1.exe
C:\MinGW\libexec\gcc\mingw32\3.4.5\cc1plus.exe      to         C:\MinGW\bin\cc1plus.exe
C:\MinGW\libexec\gcc\mingw32\3.4.5\collect2.exe      to         C:\MinGW\bin\collect2.exe

it worked well after that!
thanks again for the help!