First C program - need help with eclipse

I installed the C / C ++ CDT version of Eclipse. After creating the HelloWorld.c file and getting the code there, I get the error message "Launch failed. Binary not found".

I found on google that my Eclipse skipped the compiler and I install MinGW on my computer and add the path to the env variables (tested it with "gcc -v" in cmd and executed).

1) Now I can build, but I don’t know how to make MAKEFILE. - I read 10 lessons, but I do not understand - ideas?

2) I can build, but not run, I get "Launch failed. Binary not found" - ideas?


An error was detected: I never collected the file ".c" -.- after renaming - it works fine.

+3
source share
4
  • : make , - :

    all:
        gcc *.c -o runme.exe
    
  • , gcc (gcc [..] -o <this one>) ( runme.exe). RunRun Configurations, C/C++ Application runme.exe.

, , make . make , , ( , "dummy" ). "", , . :

all: hello

hello: main.o factorial.o hello.o
    g++ main.o factorial.o hello.o -o hello

main.o: main.cpp
    g++ -c main.cpp

factorial.o: factorial.cpp
    g++ -c factorial.cpp

hello.o: hello.cpp
    g++ -c hello.cpp

clean:
    rm -rf *o hello

, . :, , . .. all hello ( ) .. - . , . , , .

+3

, gcc (C:\MinGW\bin - ), PATH Eclipse (!). XP: http://vlaurie.com/computers2/Articles/environment.htm. .

+1

1 :

http://www-scf.usc.edu/~csci410/handouts/make.pdf

gmake , . , , Makefile :

gcc -o helloworld.exe helloworld.c

. Makefiles .

2 ?

+1

, , . , . Mach-O 64; , . http://www.thexploit.com/tools/os-x-10-6-64-bit-eclipse-cdt-missing-binaries/

I did not have the choice of a binary analyzer, and this apparently means that the CDT cannot find anything that it recognizes as binary. In my case, this meant that I just got the message "Launch failed. Binary not found", although the exact binary was specified in the run / debug configurations, including the fully qualified path.

This has nothing to do with builds, just by running / debugging. If you have problems creating the problem, it probably doesn't matter.

Screenshot of selecting binary parser

0
source

Source: https://habr.com/ru/post/1754458/


All Articles