Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29231 Discussions

C++ calling Fortran no longer working

spainchaud
New Contributor I
3,272 Views

I have a C++ DLL that calls Fortran libraries. I have had this project working for many years, but I just received a new computer, and my unit tests are failing to run on this new system. I am using Win 11, VS2022 and oneAPI 2025.2. I was previously using oneAPI 2024. In order to get a build, I changed two settings:

 

Include Directories = $(IFORT_COMPILER25)include;$(IncludePath)

Library Directories = $(IFORT_COMPILER25)lib;$(LibraryPath)

 

I use the Dependencies app to check the DLL in the unit test directory, and I see that it cannot find libifcoremd.dll and libmmd.dll. I do not see any reference to Intel directories in either of my Path environment variables, but I do not know if this is how the problem is handled. I would think Path variables would be updated during the install. What configuration do I need to change?

0 Kudos
1 Solution
Steve_Lionel
Honored Contributor III
3,174 Views

That is interesting - I just checked my system, which is a recent install, and you're right that the paths are not there! It wouldn't be the first time that the Intel installer messed this up.

Add the following to your PATH variable:

C:\Program Files (x86)\Intel\oneAPI\compiler\latest\bin

If you don't know how to do that, let me know.

View solution in original post

0 Kudos
9 Replies
Steve_Lionel
Honored Contributor III
3,241 Views

Try a reboot - changes to PATH sometimes don't take effect right away. Or, log out of Windows and in again.

0 Kudos
spainchaud
New Contributor I
3,180 Views

A reboot did not work. I see no change in the Path variable. This is where I wish I still had access to my old computer to see what is different. 

 

0 Kudos
Steve_Lionel
Honored Contributor III
3,175 Views

That is interesting - I just checked my system, which is a recent install, and you're right that the paths are not there! It wouldn't be the first time that the Intel installer messed this up.

Add the following to your PATH variable:

C:\Program Files (x86)\Intel\oneAPI\compiler\latest\bin

If you don't know how to do that, let me know.

0 Kudos
spainchaud
New Contributor I
3,025 Views

I updated my system Path variable and rebooted, but my DLL still does not see the Intel DLLs. I also updated my account path, with the same result. There must be some other configuration that I am missing.

0 Kudos
Steve_Lionel
Honored Contributor III
2,954 Views

Can you run your program from an Intel oneAPI command prompt window? 

0 Kudos
spainchaud
New Contributor I
2,920 Views

I have no console program that uses the DLL. I generally do simple modeling tasks with a unit test that dumps data to disk. These tasks are infrequent and do not warrant a full application.

 

Under linker, I added the lib path to Additional library directories. It did not help.

 

The DLLs are in a bin directory. Should that be part of the path?

0 Kudos
Steve_Lionel
Honored Contributor III
2,909 Views

Whoops, yes - I edited my post. Sorry about that.

0 Kudos
spainchaud
New Contributor I
2,894 Views

Thank you, the path to bin was what I needed. My unit tests are running again.

0 Kudos
Eliz21
Beginner
1,011 Views

can you help me? my problem starts with Fortran, I can't create a dll for C# or Excel, I was able to do it in March this year, not any more

0 Kudos
Reply