- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using Intel Fortran Compiler for Linux to recompile a program originally compiled by Compaq Visual Fortran.
A linking problem occurs.
------------------------------Detail-----------------------------------
1.o: In function `_unnamed_data$_'1.for:(.text+0x4080): multiple definition of `_unnamed_data$_'
5.o:5.for:(.text+0xe690): first defined here
2.o: In function `_unnamed_data$_':2.for:(.text+0x0): multiple definition of `_unnamed_data$_'
5.o:5.for:(.text+0xe690): first defined here
3.o: In function `_unnamed_data$_':3.for:(.text+0x43f0): multiple definition of `_unnamed_data$_'
5.o:5.for:(.text+0xe690): first defined here
4.o: In function `_unnamed_data$_':4.for:(.text+0x0): multiple definition of `_unnamed_data$_'
5.o:5.for:(.text+0xe690): first defined here
-----------------------------End---------------------------------------
Compiling with CVF passed. The program includes 31 *.for files. using command "ifort -c *.for"to compile every source file and get 31 *.o files.
But a problem occured when I am linking the *.o files to get "myapp".
I QUITE sure the program is OK. I waiting for your help. Thanks!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you INCLUDE a COMMON declaration into each source along with DATA initializations for variables in that COMMON? That is not allowed in Fortran, but some platforms let you get away with it. The correct solution is to move the initializations to a BLOCK DATA subprogram that appears only once in the program.
Can you attach sources of a test case showing the problem?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page