Author Topic: g++: fatal error: no input files  (Read 14681 times)

Offline niconol

  • Multiple posting newcomer
  • *
  • Posts: 16
g++: fatal error: no input files
« on: September 25, 2017, 02:49:29 pm »
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))

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

An idea to help me please ???

Best


(reretest)

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: g++: fatal error: no input files
« Reply #1 on: September 25, 2017, 04:02:24 pm »
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
?

[EDIT:] You are missing a back-tick in the
Code
pkg-config --libs opencv'
at the beginning...

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: g++: fatal error: no input files
« Reply #2 on: September 25, 2017, 05:19:31 pm »
You probably also want to use back ticks (`command`) and not apostrophes ('command')

Offline niconol

  • Multiple posting newcomer
  • *
  • Posts: 16
Re: g++: fatal error: no input files
« Reply #3 on: September 25, 2017, 05:35:48 pm »
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
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
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
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

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

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