Library Problems with C++ and Fortran Mixed Language Program

Library Problems with C++ and Fortran Mixed Language Program

Imagen de rcampbell1979

I am mixing Visual C++ 6 Visual Fortran 6.5 by calling Fortran subroutines with a C++ main program using both Complex and Double data types. I am getting this math error when using some common math functions, i.e. sqrt. The error is as follows:

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/ExampC4.pdb" /debug /machine:I386 /out:"Debug/ExampC4.exe" /pdbtype:sept 



The Project Settings for Fortran are:

/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/ExampC4.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c 



Does anyone know what might be the problem?

publicaciones de 3 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.
Imagen de james@elementyl.com

See here.

Imagen de rcampbell1979

Thanks so much!

Inicie sesión para dejar un comentario.