Re: Tcl Dll problem
- From: hgiese@xxxxxxxxxxxxx (Helmut Giese)
- Date: Thu, 13 Jul 2006 20:59:37 GMT
On 13 Jul 2006 12:35:28 -0700, "China" <davide.belloni@xxxxxxxxx>
wrote:
Hi,Hi,
I've developed a set of API to use BerkeleyDB in a management
information system developed in TCL. In Linux there's no problem, i can
compile it, and it work fine putting the right path for BDB library
.so.
In Windows I can compile the APi without an error, but when i excecute
the TCL program it return this error:
Couldn't load library "C:\xxx\libtclctree\libtclctree.dll": this
library or a dependent library could not be found in library path
while executing
"load C:\xxx\libtclctree\libtclctree.dll tclctree"
...
The name libtclctree.dll is the name for BDB dll that i've create and
i've give this name for wrap a lib pre-existing and see more easely if
program starts( the same thing is in linux version). I've execute
depends.exe, but it return that all dependencies is resolved.
I don't understand why it can't load this dll.
Thanks for each help!
one possible reason is that the DLL's init function is not exported.
On Linux (AFAIK) _all_ functions are exported but on Windows you have
to tell the compiler which ones you want exported by decorating those
with
__declspec(dllexport)
It is often done like this
#ifdef <compiling on Windows>
#define DLL_EXPORT __declspec(dllexport)
#else
#define DLL_EXPORT
#endif
and declaring your init function like
DLL_EXPORT int Your_Init( Tcl_Interp *interp)
so that under Windows you get the decoration and under Linux it
disappears.
HTH
Helmut Giese
.
- Follow-Ups:
- Re: Tcl Dll problem
- From: China
- Re: Tcl Dll problem
- References:
- Tcl Dll problem
- From: China
- Tcl Dll problem
- Prev by Date: Re: Need help with expect (tcl) regular expression
- Next by Date: Re: Need help with expect (tcl) regular expression
- Previous by thread: Tcl Dll problem
- Next by thread: Re: Tcl Dll problem
- Index(es):
Relevant Pages
|