User forums > Using Code::Blocks

g++: fatal error: no input files

(1/1)

niconol:
Hi,

I've got this error when compiling


--- Code: ---g++ -std=c++11 -g 'pkg-config gtkmm-3.0 --cflags' 'pkg-config opencv --cflags' pkg-config --libs opencv' -std=c++11  -c /home/pi/reretest/ihm.cpp -o obj/Debug/ihm.o
g++: fatal error: no input files
compilation terminated.
Process terminated with status 4 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))
--- End code ---

but ihm.cpp and ihm.h are in the same directory than the .cbp.

An idea to help me please ???

Best


(reretest)

BlueHazzard:
have you tried to run this from the command line with the base path of your project:

--- Code: ---g++ -std=c++11 -g 'pkg-config gtkmm-3.0 --cflags' 'pkg-config opencv --cflags' pkg-config --libs opencv' -std=c++11  -c /home/pi/reretest/ihm.cpp -o obj/Debug/ihm.o
--- End code ---
?

[EDIT:] You are missing a back-tick in the

--- Code: ---pkg-config --libs opencv'
--- End code ---
at the beginning...

BlueHazzard:
You probably also want to use back ticks (`command`) and not apostrophes ('command')

niconol:
Hi,
I added the back-tick, thanks

I change priority to compile first main.cpp

--- Code: ---g++ -std=c++11 -g 'pkg-config gtkmm-3.0 --cflags' 'pkg-config opencv --cflags' pkg-config --libs opencv' -std=c++11

--- End code ---
problem is the same.

I tried

--- Code: ---g++ -std=c++11 -g 'pkg-config gtkmm-3.0 --cflags' 'pkg-config opencv --cflags' pkg-config --libs opencv' -std=c++11
--- End code ---
form the command line

end immediately
no cimpilation I think,
I check the presences of files by a "ls"

--- Code: ---g++ -std=c++11 -g 'pkg-config gtkmm-3.0 --cflags' 'pkg-config opencv --cflags' pkg-config --libs opencv' -std=c++11

--- End code ---
they are here

--- Code: ---pi@raspberrypi:~/reretest $ ls
bin      ihm.h        ihm_sig.h  obj       pict.h        reretest.layout
ihm.cpp  ihm_sig.cpp  main.cpp   pict.cpp  reretest.cbp

--- End code ---

and meanwhile, BlueHazzard find a big beginner's mistake,
of course, about backticks

Thanks a lot, I can continue now, and be more careful

Navigation

[0] Message Index

Go to full version