NODE_MODULE error

23 views
Skip to first unread message

rhasson

unread,
Mar 25, 2012, 8:44:37 AM3/25/12
to nodejs
I'm writing a native module that wraps a C program. Below is my
module declaration but when I build it with node-waf I get the
following error:

error: ‘node_module_struct’ in class ‘node’ does not name a type

#define FREELING_BINDING
#include <node.h>
#include <v8.h>
#include "freeling_tokenizer.h"

void InitAll(v8::Handle<v8::Object> target) {
FreeLingTokenizer::Init(target);
}

NODE_MODULE(freeling, InitAll)

rhasson

unread,
Mar 25, 2012, 5:15:21 PM3/25/12
to nodejs
I figured it out. in my wscript, I should have added my
"freeling_tokenizer.cc to the source array.
Reply all
Reply to author
Forward
0 new messages