Author Topic: Possible solution for using MinGW on Vista  (Read 8300 times)

Offline acemarke

  • Single posting newcomer
  • *
  • Posts: 4
Possible solution for using MinGW on Vista
« on: July 13, 2007, 05:55:51 am »
I downloaded CodeBlocks 1.0rc2 and tried to get it running on Vista with MinGW.  As with many others, I had a ton of problems trying to get MinGW to cooperate.  Between Google and this board, I saw all sorts of comments about MinGW having problems on Vista.  Things like needing to install it to a folder off the root, requiring projects to be on the same partition as MinGW, various environment variables needing to be set, and so on.  I spent the last few hours fighting with all these different things, and got awfully frustrated in the process.  I got the compiling phase to work, but the linker always gave me a "crt2.o: No such file: No such file or directory" error message.

But... but, I finally had an idea that seems to solve all these issues.  I simply went to the "Toolchain Executables" settings tab, and pasted the full path into each of the boxes.  In other words, I went from "mingw32-g++.exe" to "D:\toolkits\MinGW513\bin\mingw32-g++.exe".  To my delight, it actually worked!  Ditto with GDB, once I installed it.

Now, weirdly enough, I had to leave the full path prefix off of the "C Compiler" option (in other words, just leave it as "mingw32-gcc.exe").  Any attempt to add that same path prefix to that file results in the message "TestApp1 - Debug" uses an invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]. Skipping...".

So, in summary, it seems that simply entering the complete path to the various toolchain executables should make MinGW work on Vista.

If anyone else can verify this, or has any comments to add, I'd appreciate it.

Mark Erikson
http://www.isquaredsoftware.com

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Possible solution for using MinGW on Vista
« Reply #1 on: July 13, 2007, 07:25:30 am »
Please switch to a latest nightly build. RC2 is very old and it's almost a history right now. Nightly builds are feature-rich and far stable than the RC2. Please download the latest nightly build from the following forum.

Quote
http://forums.codeblocks.org/index.php?board=20.0

Installation instructions are available with each release thread.

Best Regards,

Biplab
Be a part of the solution, not a part of the problem.

Offline acemarke

  • Single posting newcomer
  • *
  • Posts: 4
Re: Possible solution for using MinGW on Vista
« Reply #2 on: July 13, 2007, 07:29:25 am »
Sorry... I should have mentioned that I had the same problems with the nightlies as well.  If you look elsewhere in the forums, several people have pointed out that it's a MinGW problem, not a CodeBlocks problem.  But, since MinGW is a major component of CodeBlocks, I figure it's worth mentioning this possible solution.

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Possible solution for using MinGW on Vista
« Reply #3 on: July 13, 2007, 07:38:02 am »
I can see two problems with your MinGW installation.
1. MinGW is installed on a non-standard path.
2. Possibly you're compiling the app in another drive where MinGW is not installed. If your MinGW is installed on D: drive then, AFAIK, in Vista you can compile app source which is on D: drive only.
« Last Edit: July 13, 2007, 07:40:01 am by Biplab »
Be a part of the solution, not a part of the problem.

Offline acemarke

  • Single posting newcomer
  • *
  • Posts: 4
Re: Possible solution for using MinGW on Vista
« Reply #4 on: July 13, 2007, 07:48:48 am »
Right, that's the point.  Putting the complete path in the toolchain entries FIXES that problem.  In other words, I was able to compile a project on C: using a MinGW installation on D:.

Offline darthdespotism

  • Almost regular
  • **
  • Posts: 163
    • Coder's Nemesis
Re: Possible solution for using MinGW on Vista
« Reply #5 on: July 13, 2007, 08:36:53 pm »
Right, that's the point.  Putting the complete path in the toolchain entries FIXES that problem.  In other words, I was able to compile a project on C: using a MinGW installation on D:.

Sounds great. Would you mind share your knowledge in the wiki?

Offline acemarke

  • Single posting newcomer
  • *
  • Posts: 4
Re: Possible solution for using MinGW on Vista
« Reply #6 on: July 13, 2007, 11:52:34 pm »
Done.  I'd also like to point out that not only did I compile a project on another partition, but I did so with MinGW installed in a folder two levels deep.  I'd still appreciate it if someone else could verify my results.