- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
My workspace consits of 2 projects, one fortran and the other visual c++ 8.0 which takes fortran lib file as input.
Now if I build my project, fortran is running correctly and giving lib file but after that the following errors are coming. Also Iam calling a fortran subroutine from VC++, Can some body please help?
Error60error LNK2019: unresolved external symbol __iob referenced in function _for__io_returnlibifcoremt.lib
Error61error LNK2001: unresolved external symbol __ioblibifcoremt.lib
Error62error LNK2001: unresolved external symbol __ioblibmmt.lib
Error63error LNK2019: unresolved external symbol ___argv referenced in function _for_rtl_init_libifcoremt.lib
Error64error LNK2019: unresolved external symbol ___argc referenced in function _for_rtl_init_libifcoremt.lib
Error65fatal error LNK1120: 3 unresolved externalsc:\Program Files\MultiLateral 02 04\MultiLateral\Multilateral\Release\MultiLateral.exe1
Regards,
Suma.
My workspace consits of 2 projects, one fortran and the other visual c++ 8.0 which takes fortran lib file as input.
Now if I build my project, fortran is running correctly and giving lib file but after that the following errors are coming. Also Iam calling a fortran subroutine from VC++, Can some body please help?
Error60error LNK2019: unresolved external symbol __iob referenced in function _for__io_returnlibifcoremt.lib
Error61error LNK2001: unresolved external symbol __ioblibifcoremt.lib
Error62error LNK2001: unresolved external symbol __ioblibmmt.lib
Error63error LNK2019: unresolved external symbol ___argv referenced in function _for_rtl_init_libifcoremt.lib
Error64error LNK2019: unresolved external symbol ___argc referenced in function _for_rtl_init_libifcoremt.lib
Error65fatal error LNK1120: 3 unresolved externalsc:\Program Files\MultiLateral 02 04\MultiLateral\Multilateral\Release\MultiLateral.exe1
Regards,
Suma.
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Suma,
Appears the C++ project build lacks direction on where the find the Fortran libraries. See if the advice in the following Knowledge Base article (here) helps resolve the issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Kevin Davis (Intel)
Hi Suma,
Appears the C++ project build lacks direction on where the find the Fortran libraries. See if the advice in the following Knowledge Base article (here) helps resolve the issue.
Hi Kevin,
Thanks for the help provided. It has helped to solve my problem.
Thankyou.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, if I may add to this thread: I've got essentially the same error but was not as easily solved as the original poster.
I'm having to bring in an old program that was using VS6 with Compaq Fortran into a slightly more modern era. In this case it's Visual Studio 2005 (maybe someday we'll get current) and Intel Fortran 11.1. I get these linker errors:
1>libifcoremt.lib(for_diags_intel.obj) : error LNK2019: unresolved external symbol __iob referenced in function _for__io_return
1>libifcoremt.lib(for_nt_open_proc.obj) : error LNK2001: unresolved external symbol __iob
1>libmmt.lib(libm_error.obj) : error LNK2001: unresolved external symbol __iob
1>libifcoremt.lib(for_init.obj) : error LNK2019: unresolved external symbol ___argv referenced in function _for_rtl_init_wrap_
1>libifcoremt.lib(for_init.obj) : error LNK2019: unresolved external symbol ___argc referenced in function _for_rtl_init_wrap_
Any suggestions?
Thanks,
Brian
I'm having to bring in an old program that was using VS6 with Compaq Fortran into a slightly more modern era. In this case it's Visual Studio 2005 (maybe someday we'll get current) and Intel Fortran 11.1. I get these linker errors:
1>libifcoremt.lib(for_diags_intel.obj) : error LNK2019: unresolved external symbol __iob referenced in function _for__io_return
1>libifcoremt.lib(for_nt_open_proc.obj) : error LNK2001: unresolved external symbol __iob
1>libmmt.lib(libm_error.obj) : error LNK2001: unresolved external symbol __iob
1>libifcoremt.lib(for_init.obj) : error LNK2019: unresolved external symbol ___argv referenced in function _for_rtl_init_wrap_
1>libifcoremt.lib(for_init.obj) : error LNK2019: unresolved external symbol ___argc referenced in function _for_rtl_init_wrap_
Any suggestions?
Thanks,
Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have seen such symptoms when I have tried to link, with some objects (and/or libraries) compiled with /MT and others with /MD. The compilers inject INCLUDELIB directives into the object codes, which leads to mixing libraries inconsistently.
You can tell the linker to produce a map file. Examining the map file is a good way of finding which objects call for LIBCMT.lib and which objects call for MSVCRT.lib. Once you identify the culprits, recompile with the correct /M? option and link.
You can tell the linker to produce a map file. Examining the map file is a good way of finding which objects call for LIBCMT.lib and which objects call for MSVCRT.lib. Once you identify the culprits, recompile with the correct /M? option and link.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the answer. I am apparently getting LIBCMT and MSVCRT both included. I'm using /MAP in the linker but end up with an empty map file. All my C++ libraries are using /MD but I'm not sure about the Fortran libraries. It's using the /reentrancy:threaded option right now but I've tried the other options just in case. Any thoughts on why the map is empty? The program does not link successfully.
I'm also doing some web searching to see what I can find so thanks for any answer that can help.
Brian
I'm also doing some web searching to see what I can find so thanks for any answer that can help.
Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I resolved my problem today. I didn't realize that the "Runtime Library" option was in the Fortran "Libraries" section of the properties (since it's in the "Code Generation" section for C++). This is what the previous posters were pointing me towards with the mixed /MD and /MT options. By changing the runtime library to multithread DLL (/libs:dll /threads) the program compiled successfully. Thanks for the help.
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