unresolved external symbol _ISO_C_BINDING_mp_C_LOC

unresolved external symbol _ISO_C_BINDING_mp_C_LOC

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:

  1. Does this sound right?
  2. If this is the right/best solution for IVF 11.1.060?
  3. What is the earliest release of IVF in which this issue is resolved?

Thanks!

7 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.
Best Reply

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.

Steve - Intel Developer Support

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.

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

Citation :

newfortranuser a écrit :

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:

  1. Does this sound right?
  2. If this is the right/best solution for IVF 11.1.060?
  3. What is the earliest release of IVF in which this issue is resolved?

Thanks!

You also need to link with ifmodintr.lib if you're not linking from Fortran and/or you specified /Zl.

Steve - Intel Developer Support

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

Citation :

Steve Lionel (Intel) a écrit :

You also need to link with ifmodintr.lib if you're not linking from Fortran and/or you specified /Zl.

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.

Steve - Intel Developer Support

Laisser un commentaire

Veuillez ouvrir une session pour ajouter un commentaire. Pas encore membre ? Rejoignez-nous dès aujourd’hui