Re: Linking error

From: Warner Bruns (bruns_at_tetibm3.ee.TU-Berlin.DE)
Date: 01/11/04

  • Next message: Christian Schmidt: "Re: Linking error"
    Date: 11 Jan 2004 13:34:39 GMT
    
    

    In article <btrgon$6oo$1@online.de>, Christian Schmidt
    <christian.schmidt@ipc.uni-tuebingen.de> writes:
    > Hi,
    >
    > I'm trying to compile and link a Program using the Lapack Library.
    >
    > I get the following Error:
    >
    > christsc@fuchur Test $ g77 -c test.f
    > christsc@fuchur Test $ g77 -o test.o -lblas -llapack
    > /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/libfrtbegin.a(frtbegin.o
    > (.text+0x32): In function `main':
    > : undefined reference to `MAIN__'
    > collect2: ld returned 1 exit status
    >
    > Any idea what I do wrong.
    >
    > Thanks
    >

     It looks as if your test.f does not contain a main program.
     Is it possible that test.f only contains subroutines?

     Warner Bruns


  • Next message: Christian Schmidt: "Re: Linking error"

    Relevant Pages

    • Use of subroutines
      ... number of very knowledgeable FORTRAN programmers in this newsgroup. ... falls under the heading of programming style. ... Subroutines are, in their fundamental form, just a GO TO statement. ... it takes close to 10 minutes to compile using CVF on an AMD ...
      (comp.lang.fortran)
    • Re: Use of subroutines
      ... Subroutines are, in their fundamental form, just a GO TO ... which can be implemented efficiently with arrays. ... it takes close to 10 minutes to compile using CVF on an AMD ...
      (comp.lang.fortran)
    • Re: prototypes?
      ... code that fails to compile is ... > Prototypes are really only useful for 'compile-time argument ... Wiktionary entry, brackets may be,,, or ... > arguments' to your subroutines as a side effect ...
      (comp.lang.perl.misc)
    • calling compiled subroutines
      ... I would like to programmatically call (load and unload) ... subroutines from a VI.  There must be a way to do it, ... When I compile the main program, if I compile the supporting VIs, I am no ...
      (comp.lang.labview)
    • Re: unexplainable behaviour - f90 - looking for some tools to help diagnose
      ... between subroutines etc... ... Turn on your compiler's debugging options, ... Compile with Silverfrost. ...
      (comp.lang.fortran)