Eclipse CDT Debug not in executable format: File format not recognized after strawberry installation

StackOverflow https://stackoverflow.com/questions/22132787

سؤال

Maybe I'm missing something obvious since I searched the internet for quite a while but could not find a solution for the following problem:

I'm using Eclipse Kepler SP2 (Build id: 20140224-0627) with CDT and MinGW as compiler backend. Debugging C code with gdb worked great up until today (at least I noticed the problem today). Now I get the following error message when i want to start a progam in the debugger:

Error in final launch sequence
Failed to execute MI command:
-file-exec-and-symbols C:/[...]/Debug/test.exe
Error message from debugger back end:
"C:\[...]\Debug\test.exe": not in executable format: File format not recognized

The program runs nicely and so I thought I might have screwed up some settings. But when I tried to debug an old program, everything worked until I recomplied the old program -> same problem. If I ask the C-wizard to create a new "Hello World" ANSI C application with MinGW, the same problem occurs.

The compile commands which were used are

gcc -O0 -g3 -Wall -c -fmessage-length=0 -o "src\\test.o" "..\\src\\test.c" 
gcc -o test.exe "src\\test.o" 

I did not update my MinGW in between, but updated Eclipse.

Do you have any pointers on where to look for the problem?

Edit: I just checked the binary type: My old projects are all [x86/le], the newly compiled ones are [amd64/le]. This should be a trace.... Will update posting according to progress.

Edit2: argh I installed strawberry perl a few days ago, and the installer has changed the environment variable MINGW_HOME in origin BUILD SYSTEM to c:\strawberry\c and this screwed up my builds. Resetting it to my c:\MinGW solved the issue. I'll post this as answer, too. Heading and tags have been updated to point to this issue more directly.

هل كانت مفيدة؟

المحلول

I installed strawberry perl a few days ago, and the installer has changed the environment variable MINGW_HOME in origin BUILD SYSTEM to c:\strawberry\c and this screwed up my builds. Resetting it to my c:\MinGW solved the issue.

BTW: This happened, because strawberry added c:\strawberry\c to the PATH in front of my custom c:\MinGW and eclipse adds those to the BUILD SYSTEM variables.

نصائح أخرى

It should be a parser problem, what is your binary parser under Project/Properties/Build/Settings ?

Check Project->Properties ->C/C++ Build ->environment and path for MINGW_HOME make sure you have right gdb version (by checking under debug Configuration ->environment).

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top