- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all.
I have problems compiling my code with -g option (without -g works ok). During linking I get a bunch of errors like this:
src/modules/metrics.o:/usr/work/vip/model_x/src/modules/metrics.f90:2: multiple definition of `var$14'
src/modules/coordinates_mod.o:/usr/work/vip/model_x/src/modules/coordinates_mod.f90:2: first defined here
src/modules/metrics.o: In function `METRICS1':
/usr/work/vip/model_x/src/modules/metrics.f90:10: multiple definition of `var$16'
src/modules/coordinates_mod.o:(.bss+0x8): first defined here
src/modules/var_mod.o:(.bss+0x7f8): multiple definition of `var$14'
src/modules/coordinates_mod.o:/usr/work/vip/model_x/src/modules/coordinates_mod.f90:2: first defined here
src/modules/var_mod.o:(.bss+0x800): multiple definition of `var$16'
src/modules/coordinates_mod.o:(.bss+0x8): first defined here
These var$n's don't make any sense to me, so I can't relate them to the actuall variables.
The source is quite big, so I can't show it here. I have multiple modules referenced in different places, but I "use" modules with the "only" option everywhere, so I very much doubt I have actual multiple definitions.
I have some variables' names like dx and dx_, so I thought I might be a problem with underscoring, but playing with -us and -nus options didn't help. Any ideas?
Victor Prosolin.
P.S. Compiling the code with g95 and -g works fine.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This problem appears in seemingly random places. On another computer, which has different linux and libraries, but the same compiler I get a lot more error messages in completely different places - nothing similar to what I get on my workstation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page