MFC project with fortran modules in it, gets linker errors
-
I'm using VC 6++ and MFC. The project has some fortran modules in it. I get linker errors like these: dfor.lib(matherr.obj) : error LNK2005: __matherr already defined in msvcrtd.lib(merr.obj) libc.lib(fpinit.obj) : error LNK2005: __ldused already defined in a previous module libc.lib(fpinit.obj) : error LNK2005: __fltused already defined in a previous module and more also BUBBC.OBJ : error LNK2001: unresolved external symbol _THEPAR@4 BUBBC.OBJ : error LNK2001: unresolved external symbol _EXPARG@4 BUBBC.OBJ : error LNK2001: unresolved external symbol _BDOSE@8 where bubbc.for is the fortran file. Any input is appreciated. thnaks, sb
-
I'm using VC 6++ and MFC. The project has some fortran modules in it. I get linker errors like these: dfor.lib(matherr.obj) : error LNK2005: __matherr already defined in msvcrtd.lib(merr.obj) libc.lib(fpinit.obj) : error LNK2005: __ldused already defined in a previous module libc.lib(fpinit.obj) : error LNK2005: __fltused already defined in a previous module and more also BUBBC.OBJ : error LNK2001: unresolved external symbol _THEPAR@4 BUBBC.OBJ : error LNK2001: unresolved external symbol _EXPARG@4 BUBBC.OBJ : error LNK2001: unresolved external symbol _BDOSE@8 where bubbc.for is the fortran file. Any input is appreciated. thnaks, sb
-
Hi, Try changing your Fortran to debug multithreaded and then try integrate it with VC++. Thanks, Suman
-- "Programming is an art that fights back!"
Hi Suman, The fortran modules are just .for text files that reside in the project. They aren't compiled separately and linked. If I make a win32 console app and include these .for files as source files, the app compiles, links and runs fine. I have Visual Fortran on the machine and Visual Studio seem to know what to do in the case of a win32 app. But for an MFC app, it gives linker errors. I dont have a separate fortran project. thanks, sb