Re: Link problem with Compaq Visual Fortran
From: Robert Yu (tyyu_at_ncnu.edu.tw)
Date: 10/07/03
- Next message: flubie: "Re: fortran 90/95 compiler"
- Previous message: Antony: "Re: gvim with .F90 filename extensions?"
- In reply to: Jugoslav Dujic: "Re: Link problem with Compaq Visual Fortran"
- Next in thread: Jugoslav Dujic: "Re: Link problem with Compaq Visual Fortran"
- Reply: Jugoslav Dujic: "Re: Link problem with Compaq Visual Fortran"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 6 Oct 2003 20:32:24 -0700
"Jugoslav Dujic" <jdujicREMOVE@uns.ns.ac.yu> wrote in message news:<blrdr4$fiqqb$1@ID-106075.news.uni-berlin.de>...
> Robert Yu wrote:
> | Dear All:
> |
> | I am using the MicroSoft Visual Studio 6.0 under Window XP for a
> | project,
> | and my friend sent me a library (also created by Microsoft Visual
> | Studio),
> | yet one of the source codes is a Fortran program. He used Compaq
> | Visual Fortran
> | to compile the Fortran and C into a library. When I try to link this
> | library,
> | I first got some message saying some libraries are missing (ex: can
> | not find
> | dfor.lib, dfconsol.lib ...), in order to compile the entire project, I
> | got
> | those missing libraries. Yet, when I compile them again, I have the
> | following errors:
> |
> | dfor.lib(matherr.obj) : error LNK2005: __matherr already defined in
> | msvcrtd.lib(merr.obj)
>
> This is known as "Multiple C library syndrome". The cause is mismatch
> in Fortran and C run-time libraries (CVF uses both despite the fact
> that you might not have a single line of C within your program).
>
> One solution is to match libraries on "Fortran/Libraries" and
> "C++/Libraries" of Project Settings dialog. Make sure that these
> are the same, and that they match the setting used when the .lib
> file was compiled (usually, "Single-threaded", but you have to
> experiment). A better solution is to ask your friend to compile
> the .lib with /libdir:noauto switch (Project Settings/Fortran/
> Libraries category/Disable default library search rules check box).
> This setting says: "Don't write into this .lib information which
> run-time libraries to link with; use whatever is linked with
> 'parent'." I feel this switch should be on by default for static
> libraries, but CVF AppWizard does not do it.
>
> For more information, see (the second part of):
>
> "Visual Fortran/Visual C++ Mixed-Language Programs" in Mixed-language
> section of Programmer's guide
>
> as well as the original MCLS article in CVF Newsletter:
>
> http://h18009.www1.hp.com/fortran/visual/vfn10/page2.html
>
> Intel/CVF user's forum is located at:
>
> http://intel.forums.liveworld.com/forum.jsp?forum=76
Dear Jugoslav:
Thanks for your help.
I have make both the same run-time libraries, and it seems the
original problem solved.
Yet, the other problem occurs: The following is the list of the error
message:
GCG.lib(ly.obj) : error LNK2001: unresolved external symbol __FIsqrt
GCG.lib(ly.obj) : error LNK2001: unresolved external symbol __FIlog
GCG.lib(ly.obj) : error LNK2001: unresolved external symbol
_for_write_seq_lis
GCG.lib(ly.obj) : error LNK2001: unresolved external symbol
_for_write_seq_lis_xmit
GCG.lib(ly.obj) : error LNK2001: unresolved external symbol __FIIfexp_
GCG.lib(ly.obj) : error LNK2001: unresolved external symbol __FIcos
GCG.lib(ly.obj) : error LNK2001: unresolved external symbol
_for_write_seq_fmt
GCG.lib(ly.obj) : error LNK2001: unresolved external symbol
_for_write_seq_fmt_xmit
I check the Fortran file, and I notice the sqrt, log are used, but I
did not know where to
add the include files (as the C/C++ can add the math.h) for these
functions. Also, I did not
have any clue for "for_write_seq_lis" or "for_write_seq_lis_xmit" ...
Can you give me some more hints? Thanks.
Robert
- Next message: flubie: "Re: fortran 90/95 compiler"
- Previous message: Antony: "Re: gvim with .F90 filename extensions?"
- In reply to: Jugoslav Dujic: "Re: Link problem with Compaq Visual Fortran"
- Next in thread: Jugoslav Dujic: "Re: Link problem with Compaq Visual Fortran"
- Reply: Jugoslav Dujic: "Re: Link problem with Compaq Visual Fortran"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|