- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have an existing command line application which uses MKL functions, compiled with the Parallel Studio XE 2020 update 4 compiler, running under Visual Studio 2019 on a Windows 10 system. No additional libraries were specified in Properties or as source or resource files, although Properties does specify to include Sequential MKL libraries. The compiled program doesn't require libiomp5md.dll to run (tested on computers not having that file anywhere), and Depends.exe doesn't show any .dll dependencies. So it's clearly statically linked without any apparent explicit command to do so. I've never investigated this since it's what I want for this application.
I recently got oneAPI v. 2025.2.0 and compiled the program with the same Properties, running under Visual Studio on a Windows 11 system. But the compiled program won't run without libiomp5md.dll, which Depends shows as being a dependency.
I'd like to make a statically linked executable but haven't been successful in trying. I've included libiomp5md.lib in the Properties under Linker/Input/Additional Dependencies, both with a complete path (in quotes) to the original file in C:\Program Files\Intel\oneAPI\compiler\2025.2\lib, or just the name but with the path entered in Linker\General\Additional Library Dependencies. In both cases there are no errors when compiling but the output executable file is identical and still requires libiomp5md.dll in order to run (and is shown to need it by Depends).
How can I statically link this library (or whatever library is required)?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think it is not possible to statically link OpenMP. This feature was withdrawn years ago (see this discussion: https://community.intel.com/t5/Intel-Fortran-Compiler/Openmp-Static-Linking/m-p/1101006 ). So if you want to share your code, you need to include libiomp5md.dll in the distributable package.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think it is not possible to statically link OpenMP. This feature was withdrawn years ago (see this discussion: https://community.intel.com/t5/Intel-Fortran-Compiler/Openmp-Static-Linking/m-p/1101006 ). So if you want to share your code, you need to include libiomp5md.dll in the distributable package.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Intel only provides dynamic libraries for OpenMP on Windows.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
....Or provide users with a download link to the Intel redistributable Installer..... or indeed bundle the installer with your own installer......
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try installing the Windows 10 SDK (10.0.19041.0) and point the OneAPI compiler to this version. I have had issues with statically linked executables and dlls when using the new Windows 11 SDK (10.0.26100.4654).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks very much, everyone. I was misled by the help information accompanying the compiler, and information on the Intel Support web pages which both said it was possible and to do it like I was trying. Fortunately it's no big deal for me but I wanted to help out someone who maintains some legacy software and will probably sooner or later have to recompile it with a modern compiler.
Thanks again.
Roy

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page