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

DLL - "File not found"

kkasi
Beginner
900 Views
I created a DLL in Visual Fortran 6.6, which I use in a Visual Basic 6 program. When I compile the DLL using the Release Configuration, I am able to call the DLL functions in my VB program. However, I run into the "File not found" error when I try to debug the DLL via Visual Fortran. I am doing the following:

1. I set the Active Configuration to Debug.
2. I set the "Executable for debug session" to my VB EXE file.
3. I hit "Start Debug" -> Go, I get "File not found - test.dll"

Any help is greatly appreciated.


Karthy


0 Kudos
6 Replies
Steven_L_Intel1
Employee
900 Views
Apparently, VB isn't finding your DLL. In your VB declaration, are you giving the full path to the DLL? If not, the DLL has to be in one of the places Windows will look for it: Your current folder (which is the project folder), the folder containing VB.EXE, the Windows folder or the Windows System folder.

Steve
0 Kudos
kkasi
Beginner
900 Views
I have placed the DLL in the windows system folder. I have also tried to give the full path to the DLL and I still get the same error. When I compile the DLL as a RELEASE and I run my program, I don't get the "File not found" error. I run into a problem when I use the DEBUG version to debug my DLL.

0 Kudos
Lorri_M_Intel
Employee
900 Views
Another possibility is not that it can't find your test.dll, but that it can't find something test.dll accesses. The most likely candidate is dformdd.dll, which is the debug Fortran runtime library.

Please try this. Within the debug configuration, go to Project-Settings-Fortran, category Libraries, and select the non-debug dynamic, multithreaded library.

Rebuild, and try again. Make sure that your application is looking for this new DLL, and not the previous one that you had previously stored into the windows system area.

- Lorri

0 Kudos
kkasi
Beginner
900 Views
I don't see the "non-debug dynamic, multithreaded" library setting in VF6.6. Is there an alternate setting I can use?


Thanks.

0 Kudos
kkasi
Beginner
900 Views
By changing the library setting to anything but Debug-Single Threaded DLL or Debug Multi-Threaded, I was able to load the DLL. What are these libraries used for?

Thanks for all your help.
0 Kudos
Steven_L_Intel1
Employee
900 Views
My guess is that you're running the application on a system where CVF isn't installed. When built as a "debug configuration" DLL, that creates a dependency on non-redistributable debug DLLs. Simply rebuild the DLL as a "release configuration" and that should work out.

Lorri's use of "dynamic" was probably meant to be "DLL".

Steve
0 Kudos
Reply