- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi again.
I am using IVF 11.1.060. I have Composer XE, but there are some unrelated regressions already reported and blocking me from adopting it yet. I need a solution for 11.1.060 which has passed our acceptance testing.
If my main C++ application links with my Fortran static F.LIB, the C_LOC in my F.LIB works great.
But if my C++ DLL links with F.LIB, then I have a problem:
unresolved external symbol _ISO_C_BINDING_mp_C_LOC
So as suggested a few years ago in this forum by Steve Lionel, I built iso_c_binding.f90 from source and linked my C++ DLL with both my F.LIB and iso_c_binding.OBJ. The link completes without error. I have not tested runtime behavior yet.
Questions:
- Does this sound right?
- If this is the right/best solution for IVF 11.1.060?
- What is the earliest release of IVF in which this issue is resolved?
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As long as you are linking to the proper Fortran run-time libraries, 11.1.060 should handle this fine. You need to make sure that ifmodintr.lib is included in the link. When you build F.LIB, did you set the property Libraries > Disable Default Library Search Rules to No? It's set to Yes by default for library projects, but when linking with C you'll want that set to No.
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As long as you are linking to the proper Fortran run-time libraries, 11.1.060 should handle this fine. You need to make sure that ifmodintr.lib is included in the link. When you build F.LIB, did you set the property Libraries > Disable Default Library Search Rules to No? It's set to Yes by default for library projects, but when linking with C you'll want that set to No.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve.
A thousand thanks. How silly of me. After doing five unexpectedly hard things today (unrelated to IVF!) I think I just assumed everything was going to be difficult today. You have saved me immeasurable grief.
A thousand thanks. How silly of me. After doing five unexpectedly hard things today (unrelated to IVF!) I think I just assumed everything was going to be difficult today. You have saved me immeasurable grief.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am having the same problem (unresolved external symbol _ISO_C_BINDING_mp_C_LOC) but I am using version 10.0.025.
I tried using /Zl flag but without success.
I mention that I am constructing a DLL library which this code.
Any advice?
Thanks,
Rak
newfortranuser wrote:Hi again.
I am using IVF 11.1.060. I have Composer XE, but there are some
unrelated regressions already reported and blocking me from adopting it
yet. I need a solution for 11.1.060 which has passed our acceptance
testing.If my main C++ application links with my Fortran static F.LIB, the C_LOC in my F.LIB works great.
But if my C++ DLL links with F.LIB, then I have a problem:
unresolved external symbol _ISO_C_BINDING_mp_C_LOCSo as suggested a few years ago in this forum by Steve Lionel, I built iso_c_binding.f90 from source and linked my C++ DLL with both my F.LIB and iso_c_binding.OBJ. The link completes without error. I have not tested runtime behavior yet.
Questions:
- Does this sound right?
- If this is the right/best solution for IVF 11.1.060?
- What is the earliest release of IVF in which this issue is resolved?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You also need to link with ifmodintr.lib if you're not linking from Fortran and/or you specified /Zl.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Steve.
There is no file ifmodintr in my installation path: C:\Program Files (x86)\Intel\Compiler\Fortran\10.0.025\IA32\Lib.
I did a text search in all the library files for C_LOC and I found it in libifcoremt.lib. I used this library and the linker does not complain now. Still have to test the functionality.
Rak
Steve Lionel (Intel) wrote:You also need to link with ifmodintr.lib if you're not linking from Fortran and/or you specified /Zl.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I forget which version we moved that routine to the new library - thought it was 11.1. If you find it in libifcoremt, then use that.

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