0

I have written, compiled and ran my C program with Apache NetBeans 13 just fine, but when I try to run the debugger I get the following error:

"C:\\Users\\username\\ ... \\ProblemaBombeiros\\dist\\Debug\\MinGW_1-Windows\\problemabombeiros.exe\": 
not in executable format: File format not recognized

But the file it found is indeed a executable format .exe .

Here are the configurations for the C/C++ build tools:

Options

Am I doing something wrong or do I need to do something else to start debugging?

Matheus Farias
  • 716
  • 1
  • 10
  • 2
    What is that trailing `\\` doing in that program name? – Gerhardh Nov 21 '22 at 18:31
  • "But the file it found is indeed a executable format .exe ." Did you run that program from shell? Or how do you know is valid? File extension `.exe` is not sufficient – Gerhardh Nov 21 '22 at 18:32
  • I ran the program in the IDE, just pressed F6 and it compiled it. But I tested here in the cmd.exe and it runs strangely. The program actually needs a txt file to work with. In NetBeans it appears to recognize this file but with the cmd it doesn't. Should I store this .txt file with the .exe one? (Edit: I added the txt file in the same directory as the .exe. It runs fine in the cmd but still netbeans is having a hard time with the debugger - Error 2). – Matheus Farias Nov 21 '22 at 18:45

0 Answers0