How to inbound DLL?

Just starting out? Need help? Post your questions and find answers here.
rolstra
User
User
Posts: 11
Joined: Mon Mar 24, 2008 10:44 pm
Location: Austria

How to inbound DLL?

Post by rolstra »

Beginner's question: How can I inbound a DLL in an executable? Does the DLL have to be in the same directory as the .pb file when compiling it? Or does purebasic know automatically where the DLL files are?
Thank you - Roland.
Seldon
Enthusiast
Enthusiast
Posts: 405
Joined: Fri Aug 22, 2003 7:12 am
Location: Italia

Post by Seldon »

If you load the functions of the DLL at run-time (by OpenLibrary() & GetFunction() PB commands) , the DLL must be in a valid path when you run the calling program (if it's a custom DLL, put it in the same folder of your program).
If you import the functions file (it's called import LIB, but note it is NOT a static library) , the LIB file must be reached by the PB compiler during the compilation process.

I also suggest you to read this:
http://en.wikipedia.org/wiki/Dynamic-link_library
Post Reply