News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

MinGW 4.7 Not Compiling

Started by Dante12129, November 26, 2012, 12:14:02 AM

Previous topic - Next topic

Dante12129

I installed MinGW 4.7 and C::B won't compile with it. I installed it into C/MinGW and made C::B use that directory as a compiler. I changed the files it uses to the ones in the bin there. Now, it gives me the message:

-------------- Build: Debug in C++11 Test ---------------

Linking console executable: bin\Debug\C++11 Test.exe
Execution of '-g++.exe  -o "bin\Debug\C++11 Test.exe" obj\Debug\main.o' in 'C:\Users\Main\Documents\C++ Test\C++11 Test' failed.
Nothing to be done.

What's the problem and the fix?

stahta01

#1
I suggest trying to not use spaces in the exe name or the path containing the project.
But, this might not be your problem; just a quick guess.

Edit: No idea if the space resulting in the Compiler or Code::Blocks failing to work.

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]

Dante12129

#2
I removed the space and it still won't compile. Now I get this message:

-------------- Build: Debug in C++11_Test ---------------

Linking console executable: bin\Debug\C++11 Test.exe
obj\Debug\main.o: file not recognized: File format not recognized
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings

Alpha

Assuming the compiler is correctly installed, it is probably the plus "+" signs in the path and the executable name that are causing problems.

Dante12129

#4
Ok, removing the plus signs made it work now. It compiles and runs in C::B, but when I run the exe it gives me the message, "The program can't start because libgcc_s_dw2.dll is missing from your computer. Try reinstalling the program to fix this problem."

oBFusCATed

Why are you people so damn lazy these days and you cannot complain that there is a lack of good search engines available.
See how simple it is: http://lmgtfy.com/?q=libgcc_s_dw2.dll
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Dante12129

I tried adding compiler flags, changing the PATH variable, and using the TDM MinGW, and it still won't work outside of C::B without putting the libraries in the same place as the executable.