Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^3: XS linking problem

by GrandFather (Saint)
on Sep 23, 2017 at 22:12 UTC ( [id://1199969]=note: print w/replies, xml ) Need Help??


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

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1199969]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2024-04-19 14:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found