简体   繁体   中英

How to use C++ api in nodejs?

I would like to use the C++ API of a project from Node and I can't change the C++ code.
I looked at node-ffi but it doesn't seems to be able to work with C++ namespace and classes.

Do you know any other way?

SWIG can wrap c++ for many scripting languages, including javascript/nodejs. See http://www.swig.org/Doc3.0/Javascript.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM