Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DLL trouble

Status
Not open for further replies.

christheprogrammer

Programmer
Jul 10, 2000
258
CA
Does anyone know a good FAQ for DLL building? I am having major problems figuring it out. i.e. Is the DLL the only file required at runtime? I am actually building DLL's to extend Python.

Thanks a million
Chris
 
there is also a Lib file what you can use for load the dll by default. There could be also a tlb file, but it also is not required. John Fill
1c.bmp


ivfmd@mail.md
 
In project settings under the link tab make sure you included the .lib file and the dll is in the same folder as the executable, system32, or in a pre-defined path

Matt
 
Oh one thing more. Pay attention if you use components and how are you linking, statically or dinamically John Fill
1c.bmp


ivfmd@mail.md
 
Thanks all,
I think I am just having trouble with Python loading the DLL, I got my DLL to build successfully and also the LIB file. Does anyone happen to know how to load these into Python using 'import x' ?
Cheers

Chris
 
Is error on loading or in callind dll functions? If is the second try to declare cunctions with __cdecl or __stdcall and see which one will work. John Fill
1c.bmp


ivfmd@mail.md
 
for example instead of
int xxx();
you declare
__stdcall int xxx();
or
#extern "C" int xxx();
or
__cdecl int xxx();
also don't forget about
__declspec(dllexport) before function declaration is a requirement. John Fill
1c.bmp


ivfmd@mail.md
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top