Eclipse C++ in OSX :: program is not a recognized executable

October 3rd, 2009

This morning I encountered a strange debugging problem in Eclipse. I couldn’t set the executable in my debug configurations because the executable wasn’t recognized. Strange enough as I could perfectly execute it from command line. After a bit of try/error and internet investigation I finally found the answer. From OSX snow leopard on, gcc seems to build 64 bit executables by default. And those won’t be recognized from Eclipse in return. To solve the error, you’ve got to explicitly set your architecture to i386.

Enter your project properties and add the command line option “-arch i386″ for each C++ Linker, C++ Compiler and C Compiler. After a clean build, you should be clear to debug again. In Linker options make sure to NOT set it up as -Xlinker option.

Entry Filed under: Uncategorized


Calendar

October 2014
M T W T F S S
« Jan    
 12345
6789101112
13141516171819
20212223242526
2728293031  

Most Recent Posts