Author Topic: Execution g++ Failed  (Read 6235 times)

Peter_APIIT

  • Guest
Execution g++ Failed
« on: September 28, 2009, 09:45:53 am »
Hello to all , i have configure the code block to use cygwin g++ 4.3.2.2 compiler but when i build a project

This error display

-------------- Build: Debug in XXX ---------------

Compiling: main.cpp
Execution of 'g++-4.exe -Wall -fexceptions  -g     -c "C:/Documents and Settings/nicholas_tse/Desktop/XXX/main.cpp" -o obj/Debug/main.o' in 'C:\Documents and Settings\nicholas_tse\Desktop\XXX' failed.
Nothing to be done.

Please help.


Thanks.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: Execution g++ Failed
« Reply #1 on: September 28, 2009, 10:38:08 am »
Execution of 'g++-4.exe -Wall -fexceptions  -g     -c "C:/Documents and Settings/nicholas_tse/Desktop/XXX/main.cpp" -o obj/Debug/main.o' in
Does the file "'g++-4.exe" really exists in the path you setup in the compiler options? I've never seen g++ named that way.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7785
    • My Best Post
Re: Execution g++ Failed
« Reply #2 on: September 28, 2009, 04:05:44 pm »
Does the file "'g++-4.exe" really exists in the path you setup in the compiler options? I've never seen g++ named that way.

My CygwinPortable is named "g++-4.exe" I would guess it is a path issue. Spaces in path or something like that. I will try it right now to see if the CB Trunk works with Cygwin. Cygwin is broken sometime.

Tim S.
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

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7785
    • My Best Post
Re: Execution g++ Failed
« Reply #3 on: September 28, 2009, 04:35:52 pm »
My PortableCygWin works with CB SVN 5824; My install path has no spaces in it. The project path also has no spaces.

Warning: The project file must be on the same drive as the source code and use relative path to source code.

NOTE: I had to remove all search directories under Code::Blocks Compiler Settings.

The "Hello World" Command line program compiles and runs.

Build Log Below
Code
g++-4.exe -Wall -fexceptions  -g     -c main.cpp -o obj/Debug/main.o
g++-4.exe  -o bin/Debug/TestCygwin.exe obj/Debug/main.o    
/usr/lib/gcc/i686-pc-cygwin/4.3.2/../../../../i686-pc-cygwin/bin/ld: warning: auto-importing has been activated without --enable-auto-import specified on the command line.
This should work unless it involves constant data structures referencing symbols from auto-imported DLLs.
Info: resolving std::cout  by linking to __imp___ZSt4cout (auto-import)
Output size is 42.37 KB
Process terminated with status 0 (0 minutes, 9 seconds)
0 errors, 1 warnings

Tim S.
« Last Edit: September 28, 2009, 04:39:47 pm 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