Author Topic: MinGW problems  (Read 8526 times)

PhilG

  • Guest
MinGW problems
« on: July 24, 2007, 08:06:12 pm »
Hello all!  :D

I've been using the old (possibly ancient :P) RC2 of Code::Blocks for some time now. I'm only learning C++ as a bit of a hobby, but from my experience C::B is excellent. Before using it, I tried MS VC++ .NET, which I didn't get on with.

However, today I decided to update both Code::Blocks (to the 4300 Build) and the MinGW compiler.
First off, I completey (as far as I'm aware) removed the old versions of both of these. I then dowloaded the 5.1.3 installer for MinGW and proceeded to install, which seemed to go fine.

I then decompressed the CB package, extracted the Wx dll, and tried to start up.
I got an error informing me that the MinGw.... dll was missing, which was a little puzzling, as I believe that should only be necessary if MinGW is not installed?

I tried it with the mingw dll, and it opened up fine. However, trying to compile even a simple test brings up the following error:

Quote
Compiling: C:\Documents and Settings\Phils\Desktop\test.cpp
Execution of 'mingw32-g++.exe  -IC:\MinGW\include  -c "C:\Documents and Settings\Phils\Desktop\test.cpp" -o "C:\Documents and Settings\Phils\Desktop\test.o"' in 'C:\Documents and Settings\Phils\Desktop\CodeBlocks' failed.
Nothing to be done.

I tried removing both CB and MinGW, to no avail.

Any suggestions as to what be my problem (and, more importantly, what can be done to get around it)?

Cheers,

Phil Glass

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: MinGW problems
« Reply #1 on: July 24, 2007, 08:20:52 pm »
Quote
Compiling: C:\Documents and Settings\Phils\Desktop\test.cpp
Execution of 'mingw32-g++.exe  -IC:\MinGW\include  -c "C:\Documents and Settings\Phils\Desktop\test.cpp" -o "C:\Documents and Settings\Phils\Desktop\test.o"' in 'C:\Documents and Settings\Phils\Desktop\CodeBlocks' failed.
Nothing to be done.

I tried removing both CB and MinGW, to no avail.

Any suggestions as to what be my problem (and, more importantly, what can be done to get around it)?

Please wait for the next nightly. A bug crept into last nightly which is causing that problem. :)

Temporarily you can fix the issue by adding C:\MinGW\bin in your PATH.
Be a part of the solution, not a part of the problem.

PhilG

  • Guest
Re: MinGW problems
« Reply #2 on: July 25, 2007, 11:33:51 pm »
Hi,

Following your advice, I grabbed the latest nightly build (25th) just a few minutes ago.

However, I still have the exact same problem, and still require the MinGW dll for C::B to start :?

I don't see how MinGW could be the problem - The executables are stored at C:\MinGW\bin, and I used the installer, so there's no chance of me having made an error with extraction etc.

Is there a way I can test the compiler (I tried it with the command line, and although it seemed to do something, I'm not all that sure where the compiled/object file (s) will be stored?)? Any other ideas?

Cheers,

Phil Glass

EDIT: Oh, and I get the following message in the Code::Blocks Debug tab:

"[22:26:15.437]: Can't find compiler executable in your search path (GNU GCC Compiler)..."
« Last Edit: July 25, 2007, 11:36:57 pm by PhilG »

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5529
Re: MinGW problems
« Reply #3 on: July 25, 2007, 11:36:19 pm »
mingw dll is needed by cb, mingw10.dll  : for multithreading. Is you C:\MingW\bin in your path ??

PhilG

  • Guest
Re: MinGW problems
« Reply #4 on: July 25, 2007, 11:46:14 pm »
Hiya killerbot  :D

Hmmm - This statement:

Quote
For those who might need this one (when no MingW installed on your system) : the mingw10m.dll : http://prdownload.berlios.de/codeblocks/mingwm10.7z

in each nightly build post gave me the impression I didn't need to use that DLL (as I (at least should) have MinGW installed)?

However, the file I've downloaded (from that link) gives me a dll called "mingwm10.dll"? Is that incorrect, or was it just a typo?  :P

I have both of those dlls in the same folder as my Code::Blocks install/executable ("C:\Documents and Settings\Phils\Desktop\CodeBlocks").

Quote
Is you C:\MingW\bin in your path ??

I'm new to this, so bear with me  :P

If by "path" you mean Settings>>Compiler + Debugger Settings >>Toolchain executables, yes "C:\MinGW\bin" is there.

Cheers,

Phil Glass

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5529
Re: MinGW problems
« Reply #5 on: July 26, 2007, 12:05:15 am »
the 7 zip file (and the the dll it contains) are  correct. It is a runtime dll needed for multi threaded application created with the mingw gcc compiler.
You need it to be able to start up CB. So either that dll is next to the cb exe, or is is in your path. Dos/windows/linux environment variable (%PATH% ... and so on), so it is not the on inside CB.

So i guess you can start CB correctly, since you are already talking about menus inside CB ;-)

Then we have the fact that you want to use the (mingw) gcc compiler inside cb to build your code. Therefor you need to have it installed on your system, and tell Cb where it is.
If you installed it in the typical location : C:\MinGW, then Cb should be able to find it, you can check that inthe compiler settings the toolchain tab.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5529
Re: MinGW problems
« Reply #6 on: July 26, 2007, 12:07:52 am »
so check if the gcc compiler is installed correctly, and that the path of cb is correct (I think you don't even have to specify the bin, CB will try to locate in the dir you specify, or in a bin subdir of that specified dir).

I will check tomorrow on my laptop, which can boot also in windows. Currently I am on linux.

PhilG

  • Guest
Re: MinGW problems
« Reply #7 on: July 26, 2007, 12:28:50 am »
Yes, the dlls are next to the C::B executable.

I would try a manual install of MinGW, but all of the links here:

http://wiki.codeblocks.org/index.php?title=MinGW_installation

are broken.

I also cannot see equivalent files for each on the MinGW sourceforge page:

http://sourceforge.net/project/showfiles.php?group_id=2435

Phil Glass

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7790
    • My Best Post
Re: MinGW problems
« Reply #8 on: July 26, 2007, 01:04:00 am »
Yes, the dlls are next to the C::B executable.

I would try a manual install of MinGW, but all of the links here:

http://wiki.codeblocks.org/index.php?title=MinGW_installation

are broken.

I also cannot see equivalent files for each on the MinGW sourceforge page:

http://sourceforge.net/project/showfiles.php?group_id=2435

Phil Glass

The MinGW seems to be having issues, most likely sf.net is having redirection issues.
I could not download automatically.

Are you in the US?
If so, I can post links to the files in the US.

Per this thread, IE is still working on SF.net, but FireFox is not.
http://sourceforge.net/community/forum/topic.php?id=159&page&replies=2

Note, I could not get the files with IE7 so maybe IE6 works?

Tim S
« Last Edit: July 26, 2007, 01:18:54 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

PhilG

  • Guest
Re: MinGW problems
« Reply #9 on: July 26, 2007, 01:37:03 am »
Hi Tim  :D

Primarily I use Opera, but having tried both this and IE7, neither have worked.

I'm in the UK (and I'll be going to bed soon, its 12:30 here  :D), but I'd probably also be able to D/L from US links?

Phil Glass

PhilG

  • Guest
Re: MinGW problems
« Reply #10 on: July 26, 2007, 04:32:56 pm »
It's always worked absolutely fine until I upgraded to the newest nightly + Newest version of MinGW (from RC2).

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5529
Re: MinGW problems
« Reply #11 on: July 26, 2007, 04:45:04 pm »
upgrade from RC2 --> remove RC2 and everything it brings to your system completely, and then install fresh CB nightly (with the wx dll and maybe the mingwm10 dll), and setup your own copy of MinGW. That really should work ;-)

PhilG

  • Guest
Re: MinGW problems
« Reply #12 on: July 26, 2007, 04:54:03 pm »
Thanks guys for all your help - 20-40, that seemed to do the trick (I installed C::B in it's own folder in the root of the C: drive, and also placed the test file there, and lo-and-behold it worked :D).

Seems strange to have a 'regression' like that (I'd imagine the fault lies with the compiler)?

Cheers,

Phil Glass