c++ - Undefined Symbol in Node.js Addon -


let me have a node. There is a strange error while creating JS Action.

Error message:

Error: / media / pff / fluxdib /build/release/flux.node: undefined symbol: _ZN4flux20SinglyLinkedListWrapIiE11constructorE

I Trying to create a template objectWrap compiles the code without having to reuse it with different types, but when I need a * .node file in JS, I get an undefined symbol error.

My code for the template class is below:

  using namespace node; Using the name space v8; Name Space Flux {template & lt; Typename T & gt; Class Single-Linked ListWap: Public Object WOP {Public: Fixed zero input (handle> Lieutenant; Object> Export, Const char * symbol) {// Build Constructor Template Local & lt; Function Templates & gt; Tpl = function template :: new (new); Tpl-> SetClassName (string :: NewSymbol); Tpl-> InstanceTemplate () - & gt; SetInternalFieldCount (1); // Export Constructor = Persistent & lt; Function & gt; :: new (tpl- & gt; gatefunction ()); Export-> Set (string :: newcomb (symbol), constructor); Protected: Single Linkedist & lt; T & gt; * List_; Private: SinglyLinkedListWrap () {list_ = New Single Linkedist & lt; T & gt; (); } ~ SinglyLinkedListWrap () {list delete list_; } Single-Linkedist & lt; T & gt; * List () {return list_; } Static Persistent & lt; Function & gt; the creator; // New Single-Linked List or Single Linkedist () Call Stable Handle & lt; Value & gt; New (Cost Arguments and Eggs) {Handlescope Scope; If (args.IsConstructCall ()) // is included as Constructor: `New Single Linked List (...) 'Single Linked List & lt; T & gt; * Obj = New Single Linked List & lt; T & gt; (); Obj- & gt; Wrap (args.This ()); Return zone Close (args.This ()); } Else {// plain function is included as `SinglyLinkedList (...)`, call to call. Const int argc = 1; Local & LT; Price & gt; Argv [argc] = {Args [0]}; Return zone Close (Constructor-> New instance (RGR, AGRG)); }}}; }  

Thanks for any help :)

I Resolved this constructor by removing the reference and using tpl-> GetFunction () directly.


Comments