CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2009
    Posts
    3

    Fortran file in visual c++ 6.0

    Hello everybody.

    I am trying to do a c++ program which calls a fortran function.

    I am doing a dialog based program.

    I got this errors:

    Linking...
    dfor.lib(matherr.obj) : error LNK2005: __matherr already defined in msvcrt.lib(merr.obj)
    libc.lib(crt0dat.obj) : error LNK2005: _exit already defined in msvcrt.lib(MSVCRT.dll)
    libc.lib(crt0dat.obj) : error LNK2005: __exit already defined in msvcrt.lib(MSVCRT.dll)
    libc.lib(ieee87.obj) : error LNK2005: __controlfp already defined in msvcrt.lib(MSVCRT.dll)
    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
    libc.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in msvcrt.lib(cinitexe.obj)
    libc.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in msvcrt.lib(cinitexe.obj)
    libc.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in msvcrt.lib(cinitexe.obj)
    libc.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in msvcrt.lib(cinitexe.obj)
    libc.lib(winxfltr.obj) : error LNK2005: __XcptFilter already defined in msvcrt.lib(MSVCRT.dll)
    LINK : warning LNK4098: defaultlib "msvcrt.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
    LINK : warning LNK4098: defaultlib "libc.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
    Debug/Armado.exe : fatal error LNK1169: one or more multiply defined symbols found
    Error executing link.exe.

    Can anyone help me.

    Thanks a lot

  2. #2
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,360

    Re: Fortran file in visual c++ 6.0

    Did you change any default settings?
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

  3. #3
    Join Date
    Aug 2009
    Posts
    3

    Re: Fortran file in visual c++ 6.0

    I've changed a lot the default settings :-(

    In the fortran tab, doing multi--threaded library , dll.

    The program compiles without errors.

    Thanks for your reply.

    Do anyone have an example of calling a fortran function wich is in a *.for file from a dialog based class?

    THANKS

  4. #4
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,360

    Re: Fortran file in visual c++ 6.0

    You'd have to have the Fortran source compiled to a DLL first. It's not possible to call a function from a source file in other language.
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured