Find the answer to your Linux question:
Results 1 to 3 of 3
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2005
    Posts
    2

    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.

    Farhad

  2. #2
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    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:
    Code:
    g77 foo.o -o foo
    To get an executable file "foo".

  3. #3
    Just Joined!
    Join Date
    Jun 2005
    Posts
    2

    Thanks

    Thanks so much. It solved the problem.

  4. $spacer_open
    $spacer_close

Posting Permissions

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