3
votes

I am working on a C project in Eclipse, the environment is windows X64, When I tried to compile the program, it said:

11:54:29 **** Incremental Build of configuration Debug for project TPCembarque **** Info: Internal Builder is used for build gcc "-ID:\java workspace\TPCembarque\inc" "-ID:\java workspace\TPCembarque\lib\" "-includeD:\java workspace\TPCembarque\lib\libVirtualBoard.a" -O0 -g3 -Wall -c -fmessage-length=0 -o "src\main.o" "..\src\main.c" gcc: error: workspace\TPCembarque\lib\libVirtualBoard.a -O0 -g3 -Wall -c -fmessage-length=0 -o src\main.o ..\src\main.c : No such file or directory gcc: fatal error: no input files compilation terminated.

11:54:29 Build Finished (took 657ms)

so as a result it couldn't find main.c

All my data related to the project were saved in D:/systnum and I created my project in D:/java workspace/TPCembarque.

I've already set the build environment as d:\systnum\MinGW\bin;d:\systnum\MSys\1.0\bin I have already added the file main.c to the project 1 Could anybody tell me how to let the Compiler find main.c? thanks!

1
Add the sources path to the project Path.LPs
I think it is already addedk0ala Xing
Check it in Project-> Properties -> C/C++ Build -> Environment PATH variableLPs
MINGW_HOME D:\systnum\MinGW PATH ${MINGW_HOME}\bin;${MSYS_HOME}\bin;d:\systnum\MinGW\bin;d:\systnum\MSys\1.0\bink0ala Xing
These are the 2 variables, and paths are correct, but the value of MSYS_HOME is empty, but it is empty as default.k0ala Xing

1 Answers

1
votes

Is it possible to paste the makefile of your project?

I see a potential issue due to two different paths mentioned in your build log.

"src\main.o"  -> src is a folder in current directory
"..\src\main.c" -> src is a folder in the directory one folder back.