in reply to Re: XS linking problem
in thread XS linking problem

Thanks a lot for the use objdump on the object file and for the explanation !

I saw that there is a ExtUtils::XSpp module but it use build.pl instead of make and I have no experience with this.

I will translate my cpp code in c

François

Replies are listed 'Best First'.
Re^3: XS linking problem
by GrandFather (Saint) on Sep 23, 2017 at 22:12 UTC

    No need to stoop that low! Instead prefix the functions you want to have C linkage with extern "C":

    extern "C" void send_string (const wchar_t * str);

    If you are forward declaring the function in a header you don't need to provide the extern declaration in the definition. Now you can provide a C API and still have the power of C++ to go forth and conquer the world.

    Premature optimization is the root of all job security