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

linking a .dll in my project

david_sallngc_com
409 Views

Hi!

I have a Fortran code that requires a particular .lib file to run. Some time ago, I was advised (on this forum), as a simple solution, to add the .lib file using the Project-> Add Exisiting Item, and then compile, which I have done and this has worked perfectly. Doing this though, required me to make a copy of the associated .dll and put it in the same directory as the Intel generated .exe file.

Is there a way of easily including the .dll by means of a directory name where it resides as opposed to me having to copy it to the same directory as the .exe? I can not seem to find the proper place in the Project Properties to add the particular .dll file name.

Thank you very much for your help.

Sincerely,

David

0 Kudos
1 Reply
Steven_L_Intel1
Employee
409 Views
No, that's not the way Windows works. There is nothing in the executable that identifies the DLL other than its name, and Windows looks in a specific set of places for the DLL. The article at the link mentions DLL redirection, but that's no longer supported. It's possible you might be able to do this with a manifest, but I am not familiar enough with these to know the details.

If this is a DLL you use a lot, add its folder to the system PATH environment variable, and you'll be all set.
0 Kudos
Reply