- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
I have a program written in Fortran that calls functions from a dll written in C++. But when I run it I get an error saying that it failed to start because the dll was not found. Everything works fine if i copy the dll over to where the Fortran executable is, but I won't be able to do that later on.
Is there a ways to give the DLLIMPORT command a path to where the dll is? I have the .lib file added to my project, which the project doesn't compile without, but it doesn't seem to help with locating the dll.
I have a program written in Fortran that calls functions from a dll written in C++. But when I run it I get an error saying that it failed to start because the dll was not found. Everything works fine if i copy the dll over to where the Fortran executable is, but I won't be able to do that later on.
Is there a ways to give the DLLIMPORT command a path to where the dll is? I have the .lib file added to my project, which the project doesn't compile without, but it doesn't seem to help with locating the dll.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, there isn't. Your DLL is dependent on other DLLs that can't be found. Is your DLL built as a "debug configuration"? If so, rebuild it as a "release configuration" and that may help. But you probably have to install the MSVC run-time DLLs. Which version of Visual Studio are you running?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the reply, I'll try building as release when i get to work tomorrow. I am running it with Visual Studio .NET 2003. The machines do have 2005 also, but I had been using 2003 for everything else so I haven't tried 05 yet.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Visual C++ 2005 redistributables package
For Visual Studio.NET 2003, you will probably have to copy msvcr71.dll along with your executable.

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