News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Code::Blocks and MinGW

Started by connexion2000, August 05, 2007, 04:48:23 PM

Previous topic - Next topic

connexion2000

Hi!
How does Code::Blocks detect MinGW?
I am asking because I have installed MinGW on my system, but Code::Blocks didn't detec it.

stahta01

I do not think the detection part works for MinGW.

Tim S
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

Biplab

Quote from: stahta01 on August 05, 2007, 05:20:34 PM
I do not think the detection part works for MinGW.

It works for some standard installation dirs. But it does not work if you use any non-standard path.
Be a part of the solution, not a part of the problem.

thomas

The present code includes querying the registry as well as looking in "standard" places. Thus, non-"standard" places should work too, if the installer was used.

However, it is of course always possible that the MinGW installer is changed and we don't know :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

connexion2000

MinGW 5.1.3 installer was used. It's quite new. What registry keys does it look for?

raph

It looks in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall for a key starting with "Minimalist GNU for Windows" and reads the value of "InstallLocation".

connexion2000

Now it is: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall with a key "MinGW"

dje

An improvement could be to look in directories pointed by the PATH environment variable (at least on Windows) for the standard MinGW binaries.
I guess there must be equivalent on other OSs.

Dje

raph

Quote from: dje on August 10, 2007, 02:17:02 PM
An improvement could be to look in directories pointed by the PATH environment variable (at least on Windows) for the standard MinGW binaries.
Good idea. I've just submitted a patch.