Assuming we are talking unix/linux, if you have made an a.out file you *have* linked. a.out should be executable.
When you compile with the -c option you just compile without linking and general produce a ".o" file.
If you want a.out to be name something other than a.out then you need to use the -o option.
g++ -o myprog myprog.cpp will produce an executable named myprog instead of a.out
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment