Results 1 to 2 of 2

Thread: gcc-fortran-4.3 compiler

  1. #1
    abragolas NNTP User

    Default gcc-fortran-4.3 compiler

    Greetings, after compiling a program with gcc-fortran-4.3, the compiler creates an executable file, such as "file.OUT"

    I've tried t run it under xterm and konqueror (KDE 3.5), but nothing happens!

    Shall I do something else?

    Thanks!

  2. #2
    Join Date
    Jun 2008
    Location
    Schenectady, NY
    Posts
    138

    Default Re: gcc-fortran-4.3 compiler

    Is your program expecting some sort of input? It's hard to tell what's wrong based on your description.

    A quick test confirms gfrotran-4.3 behaves as expected (hello.f95):

    Code:
    program hello
        print *,"Hello World!"
    end program hello
    Code:
    kenn@loki:~> gfortran-4.3 -o hello hello.f95 
    kenn@loki:~> ./hello 
     Hello World!
    kenn@loki:~> file hello
    hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), for GNU/Linux 2.6.4, dynamically linked (uses shared libs), not stripped
    By default, if you don't specify an output file with the -o option, it will generate a.out.

    It seems sensitive to the extension on your source file. This example would not compile as "hello.f" but would as "hello.f90" and "hello.f95".

Posting Permissions

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