From 92fe51f2939379b761be5962f09eb1348cb5c61f Mon Sep 17 00:00:00 2001 From: adam Date: Mon, 29 Oct 2012 18:44:43 +0700 Subject: [PATCH] #1 --- node/binding.gyp | 12 +++++++++++- node/ejdb_native.cc | 3 +++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/node/binding.gyp b/node/binding.gyp index b238a88..75cc305 100644 --- a/node/binding.gyp +++ b/node/binding.gyp @@ -4,7 +4,17 @@ 'target_name' : 'ejdb_native', 'sources' : ['ejdb_native.cc'], 'include_dirs': ['../tcejdb'], - 'libraries' : ['-L../tcejdb'] + 'libraries' : [ + '-L../../tcejdb', + '-Wl,-Bstatic -ltcejdb', + '-Wl,-Bdynamic', + '-lbz2 -lz -lrt -lpthread -lm -lc' + ], + 'cflags': [ + '-fPIC', + '-D_FILE_OFFSET_BITS=64', + '-D_LARGEFILE_SOURCE' + ] } ] } \ No newline at end of file diff --git a/node/ejdb_native.cc b/node/ejdb_native.cc index bc5fe2f..75bd8b8 100644 --- a/node/ejdb_native.cc +++ b/node/ejdb_native.cc @@ -10,6 +10,9 @@ using namespace v8; namespace ejdb { void Init(v8::Handle target) { + EJDB *jb = ejdbnew(); + ejdbdel(jb); + #ifdef __unix setlocale(LC_ALL, "en_US.UTF-8"); //todo review it #endif -- 2.7.4