2
編寫C++ Node.JS插件時,相當於require('./someModule')
,因此可以在已編譯的插件中使用模塊。使用C++插件調用需求
我發現這個方法:
Handle<String> source =
String::New("NameOfLibrary.register(require('./someModule'))");
Handle<Script> script =
Script::Compile(source);
script->Run();
這要是配合使用what I asked here將很好地工作,但我不知道是否有一個更原始的方式。
你的意思是'C++'我假設? – loganfsmyth
@loganfsmyth對,對不起 – topherg