Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. MFC project with fortran modules in it, gets linker errors

MFC project with fortran modules in it, gets linker errors

Scheduled Pinned Locked Moved C / C++ / MFC
c++help
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    ns
    wrote on last edited by
    #1

    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

    R 1 Reply Last reply
    0
    • N ns

      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

      R Offline
      R Offline
      rp_suman
      wrote on last edited by
      #2

      Hi, Try changing your Fortran to debug multithreaded and then try integrate it with VC++. Thanks, Suman

      -- "Programming is an art that fights back!"

      N 1 Reply Last reply
      0
      • R rp_suman

        Hi, Try changing your Fortran to debug multithreaded and then try integrate it with VC++. Thanks, Suman

        -- "Programming is an art that fights back!"

        N Offline
        N Offline
        ns
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups