Code::Blocks Forums

User forums => Help => Topic started by: Dante12129 on November 26, 2012, 12:14:02 am

Title: MinGW 4.7 Not Compiling
Post by: Dante12129 on November 26, 2012, 12:14:02 am
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?
Title: Re: MinGW 4.7 Not Compiling
Post by: stahta01 on November 26, 2012, 01:13:13 am
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.
Title: Re: MinGW 4.7 Not Compiling
Post by: Dante12129 on November 26, 2012, 01:25:45 am
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
 
Title: Re: MinGW 4.7 Not Compiling
Post by: Alpha on November 26, 2012, 01:31:54 am
Assuming the compiler is correctly installed, it is probably the plus "+" signs in the path and the executable name that are causing problems.
Title: Re: MinGW 4.7 Not Compiling
Post by: Dante12129 on November 26, 2012, 01:34:26 am
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."
Title: Re: MinGW 4.7 Not Compiling
Post by: oBFusCATed on November 26, 2012, 02:14:44 am
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
Title: Re: MinGW 4.7 Not Compiling
Post by: Dante12129 on November 26, 2012, 02:52:05 am
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.