Author Topic: MinGW 4.7 Not Compiling  (Read 4914 times)

Offline Dante12129

  • Single posting newcomer
  • *
  • Posts: 4
MinGW 4.7 Not Compiling
« 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?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7597
    • My Best Post
Re: MinGW 4.7 Not Compiling
« Reply #1 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.
« Last Edit: November 26, 2012, 01:15:17 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Dante12129

  • Single posting newcomer
  • *
  • Posts: 4
Re: MinGW 4.7 Not Compiling
« Reply #2 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
 
« Last Edit: November 26, 2012, 01:32:11 am by Dante12129 »

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: MinGW 4.7 Not Compiling
« Reply #3 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.

Offline Dante12129

  • Single posting newcomer
  • *
  • Posts: 4
Re: MinGW 4.7 Not Compiling
« Reply #4 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."
« Last Edit: November 26, 2012, 01:42:37 am by Dante12129 »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: MinGW 4.7 Not Compiling
« Reply #5 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
(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!]

Offline Dante12129

  • Single posting newcomer
  • *
  • Posts: 4
Re: MinGW 4.7 Not Compiling
« Reply #6 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.