Mail Archives: cygwin/1997/07/03/07:31:17
Hi!
I finally succeeded in building a dll from some of my
unix-c++-sources. Under Unix I build a '.so' from the same sources and
load the Shared Library into a runnig 'tclsh76' via the tcl-'load'-command
(to be precise, I use the package-mechanism). After bulding a dll with
gnuwin32 I have problems to load it into a tclsh under NT. That's how
the error looks like:
: 216 MIRACULIX:/OBJ>
: tclsh76
: % load DateTime.dll
: couldn't find procedure Datetime_Init
: % exit
But the symbol Datetime_Init exists in the dll as a 'nm'-run can proove:
: 216 MIRACULIX:/OBJ>
: > nm DateTime.dll | c++filt | grep Init
: 10001d70 T _Datetime_Init(Tcl_Interp *)
: 1000165c T Date::_InitializeEpoch(void)
: 100020bc T Time::_Initialize(void)
: 1001200c D __4Date$epochInitialized
: 10002e9c T ios::Init::_(void)
Thus, though the function 'Datetime_Init' does exist in the dll, the
tcl-load-command cannot find it. Remind that the same procedure works
fine under Unix.
Here is the source-code for my 'Datetime_Init'-function:
int Datetime_Init _ANSI_ARGS_((Tcl_Interp *interp));
int
Datetime_Init (Tcl_Interp* interp) {
printf( "Initializing Package DateTime %s: ", __PACKAGEVERSION__ );
int provRes = Tcl_PkgProvide(interp, "DateTime", __PACKAGEVERSION__ );
if ( provRes == TCL_OK ) {
puts("OK!");
return TCL_OK;
}
else {
puts("Failed!");
return TCL_ERROR;
}
}
Is there anything special for gnuwin32 I have to take into account? A
'extern "C"', a special compiler-flag or something like that???
Besides, for my problem it doesn't matter whether the 'tclsh' is built
wit VC++ or with gnuwin32.
Thx in advance for any hints,
--- Roland.
---
Roland Geier Phone: ++49 (8505) 92181
Universitaet Passau, GER Fax: ++49 (8505) 922311
Lehrstuhl Prof. Dr. Donner geier AT forwiss DOT uni-passau DOT de
D-94032 Passau http://www.uni-passau.de/~geier/
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -