compiling using g++
After installing gcc
and gcc-c++
using yum
, I tried to compile some extremely simple c++ programs, those of the kind that print "hello".
- I used
g++ -c prog.o prog.cpp
and retrived theprog.o
file without any problems - I used
g++ -o prog.exe prog.o
and retrived theprog.exe
file without any problems
BUT, when i tried to run the program in the terminal by writing prog
, I get
bash: prog: command not found...
does anyone knows why?? I've been trying to do that for some hours now...
Can you run "ls -la prog.exe" ? Maybe the execution flag is not set.