Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29408 ディスカッション

C++ calling Fortran no longer working

spainchaud
新規コントリビューター I
3,900件の閲覧回数

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 件の賞賛
1 解決策
Steve_Lionel
名誉コントリビューター III
3,802件の閲覧回数

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.

元の投稿で解決策を見る

9 返答(返信)
Steve_Lionel
名誉コントリビューター III
3,869件の閲覧回数

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

spainchaud
新規コントリビューター I
3,808件の閲覧回数

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. 

 

Steve_Lionel
名誉コントリビューター III
3,803件の閲覧回数

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.

spainchaud
新規コントリビューター I
3,653件の閲覧回数

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.

Steve_Lionel
名誉コントリビューター III
3,582件の閲覧回数

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

spainchaud
新規コントリビューター I
3,548件の閲覧回数

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?

Steve_Lionel
名誉コントリビューター III
3,537件の閲覧回数

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

spainchaud
新規コントリビューター I
3,522件の閲覧回数

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

Eliz21
ビギナー
1,639件の閲覧回数

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

返信