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

Choice of runtime libraries

OP1
New Contributor III
326 Views
Assume that I have a program P and a set of DLLs D1, D2 etc.

Should P and all the DLLs be linked against the same runtime library (say "Multithread DLL")?
Should P be linked against the "Multithread" library and the DLLs against the Multithread DLL library?

It's probably a silly question... but I couldn't find a definite answer to this in the documentation.

Thanks,

Olivier
0 Kudos
3 Replies
Steven_L_Intel1
Employee
326 Views
All should be linked against the same DLL libraries. If you link P with the static libraries, you may get various errors with I/O and dynamic allocation as you will have two separate copies of the libraries in your image.
0 Kudos
OP1
New Contributor III
326 Views
OK, this makes sense.

Now, regarding my own DLLs: How can I control the version of these DLLs, in other words, how can I define a version number in my DLL, and then check in my code that the DLL present in the application path is the right version?
Is this something that I need to implement manually (hard codethe version controlin both my code and my DLLs)? Or is there a built-in facility for this? I see that in Project Properties\Linker there is a Version parameter.

Olivier
0 Kudos
Steven_L_Intel1
Employee
326 Views
The only way to do this is with manifests and then have your DLLs in a private or shared assembly. This is a lot of hassle. You can, however, pick up the "file version" information that is set in a resource file by calling GetFileVersionInfo and check that.
0 Kudos
Reply