View Full Version : cannot execute binary file
May 6th, 2007, 03:48 AM
I created a program in c++
I compiled the program without errors
$ g++ -c filename -o filename.o
message : cannot execute binary file
can anyone help?
May 6th, 2007, 05:41 AM
The "-c" flag generates an object file... This isn't what you want to execute (object files are used for linking).
Omit the "-c" flag and don't use the ".o" extension if you are creating an executable file.
May 6th, 2007, 06:44 AM
For example... (http://ubuntuforums.org/showpost.php?p=2448880&postcount=3)
May 6th, 2007, 06:47 AM
An example with multple source files... (http://ubuntuforums.org/showpost.php?p=2524773&postcount=9)
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.