Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    bash: cannot execute binary file

    Hi, I have installed Mandriva 2005 on my P4 machine. Everything is fine except the fact that when I compile a Fortran 77 program using "g77 -c" command, I cannot run it! It says "cannot execute binary file". I have tried to run it as root or even change the permissions but it still does not work.
    I appreciate your help.


  2. #2
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    St. Petersburg, FL
    If the g77 compiler takes the same flags as gcc does (it does) then all you did was create an object file. You need to now do:
    g77 foo.o -o foo
    To get an executable file "foo".

  3. #3


    Thanks so much. It solved the problem.

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts