1

I am writing a Windows project that needs to be run just on the .exe file, with no requirement for any external libraries at run time. I have it set to MT (no dll) in code generation in the project properties. For speed of execution testing on my code, I have used the omp_get_wtime() function call as part of omp.h to attain delta times for code executions.

I have been testing my release .exe file on a "normal" Windows laptop ("normal" meaning it not having VS installed), and running the program flags an error "VCOMP120.dll" missing. When I comment out the omp.h include and all relevant code relating to it, the program runs fine.

My question is, can this file be completely included compile time, so there is no dependencies happening at run time?

Note: Please forgive any wrong use of terminology, I'm new.

Thanks in advance.

2
  • It's called static linking (what you have now is dynamic linking - DLL meaning Dynamic Link Library). It may or may not be possible depending on the library.
    – Johan
    Dec 8, 2013 at 19:10
  • It is not an option, you'll always have a dependency on vcomp120.dll when you use OMP. This is very common in threading support libraries, the DllMain's DLL_THREAD_ATTACH notification is an important one. Dec 8, 2013 at 21:45

1 Answer 1

1

Microsoft implementation of omp relies only on the dynamic link library vcomp120.dll (in VC2013) and there isnt a static version.

If, for any reason, you want a static multithread omp lib, use the intel library libiomp5mt.lib provided with the intel c++ 11 compiler. The intel library is compatible with VC2013. You can download from the intel site a free evaluation copy of the compiler containing libiomp5mt.lib along with the debug and the dynamic versions.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.