http://qs1969.pair.com?node_id=485783


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
TYPEMAP PBar T_PTROBJ
Foo-Bar/Bar.xs
typedef 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/typemap
TYPEMAP PBarBuilder T_PTROBJ PBar T_PTROBJ
Foo-Bar-Builder/Builder.xs
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__Bar
Get the point?