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

A couple of libraries missing when launching the executable, but not when running it from inside MSV

saikonobiwa
New Contributor I
1,136 Views

Greetings,

On one PC my .exe file gives two error messages shown in the screenshot below. The same package works fine from inside MSV (CTRL+F5). I have reinstalled the compiler, no change. On another PC I do not have this problem. My configuration is listed below.

I would tentatively say that if the problem was in the PATH environment variable, then running the software directly of from inside MSV should not make any difference, but I may be wrong. I list below also my Directory List.

Any hint on what can be wrong?

Thank you in advance.

missing_libraries.jpg

Microsoft Visual Studio Community 2022
Version 17.8.5
VisualStudio.17.Release/17.8.5+34511.84
Microsoft .NET Framework
Version 4.8.09032

Installed Version: Community

Visual C++ 2022 00482-90000-00000-AA451
Microsoft Visual C++ 2022

ASP.NET and Web Tools 17.8.358.6298
ASP.NET and Web Tools

Azure App Service Tools v3.0.0 17.8.358.6298
Azure App Service Tools v3.0.0

C# Tools 4.8.0-7.23572.1+7b75981cf3bd520b86ec4ed00ec156c8bc48e4eb
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Intel® Fortran Compiler 2024.0
Intel® Fortran Compiler 2024.0, Copyright © 2002-2023 Intel Corporation. All rights reserved.

Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

NuGet Package Manager 6.8.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

Test Adapter for Boost.Test 1.0
Enables Visual Studio's testing tools with unit tests written for Boost.Test. The use terms and Third Party Notices are available in the extension installation directory.

Test Adapter for Google Test 1.0
Enables Visual Studio's testing tools with unit tests written for Google Test. The use terms and Third Party Notices are available in the extension installation directory.

TypeScript Tools 17.0.20920.2001
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools 4.8.0-7.23572.1+7b75981cf3bd520b86ec4ed00ec156c8bc48e4eb
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools 17.8.0-beta.23475.2+10f956e631a1efc0f7f5e49c626c494cd32b1f50
Microsoft Visual F# Tools

Visual Studio IntelliCode 2.2
AI-assisted development for Visual Studio.

*********************

Directory List

$(VSInstallDir)VC\Tools\MSVC\$(VCToolsVersion)\lib\x64
$(UniversalCRTSdkDir)Lib\$(UCRTVersion)\um\x64
$(UniversalCRTSdkDir)Lib\$(UCRTVersion)\ucrt\x64
$(IFortInstallDir)lib
$(MKLInstallDir)lib
$(VSInstallDir)VC\Tools\MSVC\$(VCToolsVersion)\atlmfc\lib\x64
$(WindowsSdkDir)lib\winv6.3\um\x64

0 Kudos
1 Solution
Barbara_P_Intel
Employee
894 Views

For detailed information about the new directory structure called "Unified Layout", including how to initialize the environment and advantages with the Unified layout, refer to Use the setvars and oneapi-vars Scripts with Linux and Use the setvars and oneapi-vars Scripts with Windows.

View solution in original post

0 Kudos
12 Replies
mecej4
Honored Contributor III
1,111 Views

Visual Studio modifies the environment for your OneAPI compiled programs to run. From a plain command window, these modifications are not in effect. There is a batch file in the OneAPI base directory that you can run to set up the environment:

 

"<path-to-OneAPI-base-directory>\setvars.bat" intel64 vs2022

 

 

0 Kudos
saikonobiwa
New Contributor I
1,094 Views

Thank you for your answer. Unfortunately, it does not seem to work. Below is a screenshot of the command line (just in case I got it wrong). No effect at all...

setvars.jpg

 

 

0 Kudos
mecej4
Honored Contributor III
1,084 Views

Did you try to run your "alibtepericline.exe" from that OneAPI command window that you just opened? The screenshot shows that you ran the batch file. That action would have modified the environment for commands issued subsequently within that command window, not elsewhere.

What happens if, after you see the response "oneAPI environment initialized", you enter the command "alibtepericline" followed by any command line arguments needed?

0 Kudos
saikonobiwa
New Contributor I
1,077 Views

Same. see the screenshot. When I click on "OK" I get the second error message.

FromCMD.jpg

Same result from inside de OneAPI directory

FromCMD.jpg

0 Kudos
saikonobiwa
New Contributor I
1,076 Views

My environment variables, if you need them

path.jpg

0 Kudos
saikonobiwa
New Contributor I
1,065 Views

I have just added C:\Program Files (x86)\Intel\oneAPI\compiler\2024.0\bin\ to my PATH environment variable and now it seems to work. I do not understand why it suddenly stopped working, it was apparently after upgrading from 2023 to 2024 version. May the upgrade has deleted the necessary line from the PATH variable?

What is even more strange, is that on a different PC, with exactly the same configuration and same upgrade, I did not meet this problem.

0 Kudos
mecej4
Honored Contributor III
1,047 Views

In the two screenshots of the command window that you posted, you attempted to run your application "alibtepericline.exe" without running the oneAPI setvars.bat batch file.

Setting the PATH to include the compiler bin directory is not a complete solution. That will still leave the LIB, INCLUDE and other environmental variables undefined the way OneAPI needs.

0 Kudos
andrew_4619
Honored Contributor III
1,042 Views
Those DLLs with the DD ending are debug versions that are only available in the VS environment. Make a release build and that uses the standard redistributables.
saikonobiwa
New Contributor I
1,024 Views

That the debug DLLs are only available in MSV sounds logic. But I am using the debut version since a while and it always worked by simply double-clicking the executable. While did it suddenly stop working? That what I do not get. Anyway, adding the path in my environment variable I have restored the usual behavior.

0 Kudos
saikonobiwa
New Contributor I
1,024 Views

But I did already run the batch file! And it did not solve my problem.

I still do not understand why it stopped working after the upgrade to 2024, and why it works fine on another PC on which I did exactly the same upgrade.

0 Kudos
andrew_4619
Honored Contributor III
1,015 Views

Probably because 2024 has an entirely different folder structure and you had path/environment settings that worked with the old setup but not the new one. 

0 Kudos
Barbara_P_Intel
Employee
895 Views

For detailed information about the new directory structure called "Unified Layout", including how to initialize the environment and advantages with the Unified layout, refer to Use the setvars and oneapi-vars Scripts with Linux and Use the setvars and oneapi-vars Scripts with Windows.

0 Kudos
Reply