in reply to Re: XS Modules: Dependencies
in thread XS Modules: Dependencies
Yes, i know that. But XS is actually needed since i want to write a OO interface to a (non trivial) Win32 C API.
(and for sure, i know how to walk! :) )
so for now i have the following code
Foo-Bar/typemap
so, the question is: do i have to call Foo::Bar::new inside Foo::Bar::Builder::create? or do i have to reimplement the new function of Foo::Bar::new inside Foo::Bar::Builder, or what?
so, the Foo::Bar::new is now defined inside the Foo/Bar/Bar.dll, and the C compiler does not know, where to find it. I guess it does not help to link against Foo\Bar\Bar.lib, since the dll just exports
(and for sure, i know how to walk! :) )
so for now i have the following code
Foo-Bar/typemap
Foo-Bar/Bar.xsTYPEMAP PBar T_PTROBJ
Foo-Bar-Builder/typemaptypedef struct __Bar { // ... } Bar, *PBar; MODULE = Foo::Bar PACKAGE = Foo::Bar PBar new(class); const char* class PREINIT: PBar retval; CODE: New(0, retval, 1, Bar); RETVAL = retval; OUTPUT: RETVAL
Foo-Bar-Builder/Builder.xsTYPEMAP PBarBuilder T_PTROBJ PBar T_PTROBJ
typedef struct __BarBuilder { // ... } BarBuilder, *PBarBuilder; MODULE = Foo::Bar::Builder PACKAGE = Foo::Bar::Builder PBarBuilder new(class); const char* class PREINIT: PBarBuilder retval; CODE: New(0, retval, 1, BarBuilder); RETVAL = retval; OUTPUT: RETVAL MODULE = Foo::Bar::Builder PACKAGE = Foo::Bar::BuilderPtr PBar create(void); PREINIT: PBar retval; CODE: RETVAL = retval; OUTPUT: RETVAL
so, the question is: do i have to call Foo::Bar::new inside Foo::Bar::Builder::create? or do i have to reimplement the new function of Foo::Bar::new inside Foo::Bar::Builder, or what?
so, the Foo::Bar::new is now defined inside the Foo/Bar/Bar.dll, and the C compiler does not know, where to find it. I guess it does not help to link against Foo\Bar\Bar.lib, since the dll just exports
1 0 00001000 _boot_Foo__Bar 2 1 00001000 boot_Foo__BarGet the point?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: XS Modules: Dependencies
by diotalevi (Canon) on Aug 23, 2005 at 13:32 UTC | |
by esskar (Deacon) on Aug 23, 2005 at 18:08 UTC |
In Section
Seekers of Perl Wisdom