- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am mixing Visual C++ 6 Visual Fortran 6.6 by calling Fortran subroutines with a C++ main program. I am getting this math error when building it. The error is as follows:
I have searched the help pages and have not found any help. The project settings for my project are below.
The Project Settings for Link are:
The Project Settings for Fortran are:
The Project Settings for C++ are:
Does anyone know what might be the problem?
dfor.lib(matherr.obj) : error LNK2005: __matherr already defined in LIBCD.lib(matherr.obj) Debug/ExampC4.exe : fatal error LNK1169: one or more multiply defined symbols found Error executing link.exe.
I have searched the help pages and have not found any help. The project settings for my project are below.
The Project Settings for Link are:
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/test.pdb" /debug /machine:I386 /out:"Debug/test.exe" /pdbtype:sept
The Project Settings for Fortran are:
/check:bounds /compile_only /dbglibs /debug:full /nologo /traceback /warn:argument_checking /warn:nofileopt /module:"Debug/" /object:"Debug/" /pdbfile:"Debug/DF60.PDB"
The Project Settings for C++ are:
/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Debug/test.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
Does anyone know what might be the problem?
Thank youvery much!
Link Copied
7 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I suppose you are linking math libraries both from your C++ and your Fortran code.
If you were lucky, you might succeed by excluding libcd.lib from the link, hoping that
dfor.lib can take care of the references from C++.
While this forum is a good place to find experts on such problems, you may be aware
that HP took responsibility for CVF support away from Intel, so these compiler versions
appear headed for orphan status.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We still welcome CVF questions here, however.
The usual solution to this problem is to explicitly add dfor.lib to the list of libraries in the Link tab.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
"We still welcome CVF questions here, however."
That's reassuring, Steve. IVF is coming along nicely but it hasn't been in the running as long as D(C)VF. I'm sure that there are IVF customers who have stabilized D(C)VF applications without ever intending to ever migrate them to IVF.
BTW, how does D(C)VF matherr.obj differ from MSCV's matherr.obj? BION, matherr is the singular omission from the MSCV CRT source.
Ciao,
Gerry T.
That's reassuring, Steve. IVF is coming along nicely but it hasn't been in the running as long as D(C)VF. I'm sure that there are IVF customers who have stabilized D(C)VF applications without ever intending to ever migrate them to IVF.
BTW, how does D(C)VF matherr.obj differ from MSCV's matherr.obj? BION, matherr is the singular omission from the MSCV CRT source.
Ciao,
Gerry T.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your quick reply! But how can I add dfor.lib to the list of libraries?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Project..Settings..Link. In the field of additional libraries/objects, put dfor.lib first in the list.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, steve. I cannot find the item of dfor.libin the field of object/libraries. Is that the problem of my version?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You have to add the dfor.lib by yourself. Just type itat the beginning of the list.
Christian
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page