Calling a DLL works on my machine, but nobody else's.

aikidojones

New member
Joined
Jan 8, 2008
Messages
2
Programming Experience
Beginner
Hi all. I apologize if my question is a dumb one but I'm new to programming and trying to work out what I've done wrong. I have a .dll file that I've written in Fortran (I know.. I know..). All it does is take a file of one format and rearrange it into a new format. My VB.Net program is a simple dialog box that allows you to browse for a filename, then click the Go button, which calls this DLL. The program works fine on the machine on which I developed it, even if I take just the .exe and the .dll and put them in their own folder, then run it. But when I put these two files on another machine, the application fails at the point where I try to call the .dll. It says it could not load the .dll because the application is not configured properly.

I assume this is some extra step I have to do in Visual Studio 2005 and I've flailed around trying the publish feature, etc etc but nothing seems to change the behavior. Any ideas or pointers toward some documentation that can help an utter beginner would be greatly appreciated.

-Thanks!
 
solved it..

It turns out that the problem was actually in the build for the .dll. There is a switch to decide whether it is linked statically or dynamically (Project>Properties.. Config Properties>Fortran>Libraries). By putting it static and rebuilding the .dll it works on other machines now. Hopefully this will help some other hopeless noob having the same problem.
 
Back
Top