This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

multiple definition of `MAIN__'


Hello,

I am still trying to adjust an sgi-fortran-code to linux g77.  I get
this error-message:

main.o(.text+0x10c3): In function `MAIN__':
: undefined reference to `save_vel__'
main.o(.text+0x10d2): In function `MAIN__':
: undefined reference to `save_pres__'
collect2: ld returned 1 exit status
make: *** [calc_les_03_cube] Error 1

Without the two subroutines 'save_vel.f''save_pres.f' the program works
well.

So I tried the 'nm'-utility for the first time and I get this:

         U do_fio
         U do_lio
         U dphidx_
         U dphidy_
         U e_wsfe
         U e_wsle
         U f_clos
         U f_open
         U s_cat
         U s_wsfe
         U s_wsle
00000000 T save_vel__
00000000 D visit_
00000002 C prin1_
00000004 C caser_
0000000c C pres_
00000010 C prin2_
00000020 C vecti_
00000020 C vectl_
00000024 C allc_
00000024 C turb_
00000030 C alll_
00000030 C point_
00000034 C casei_
00000038 C alli_
000000c0 C vectc_
00000cd1 T MAIN__
00061a9c C allr_
00340d10 C flupr_
0035eda0 C geom_
00b722b0 C node_
02709c00 C coef_
061986a0 C vectr_

On http://www.bo.infn.it/alice/alice-doc/mll-doc/migvms/node22.html I
read:
"In this way the location of MAIN in the code is found and the wrong
routine detected."
So in my example the wrong routine should be placed between vectc allr.
But, how can I find the mistake? What does that mean?

Greetings!
Fabian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]