fuwaneko / node-protobuf

Google Protocol Buffers wrapper for Node.js [UNMAINTAINED]
181 stars 42 forks source link

node-protobuf not working on FreeBSD 9.2 #72

Closed snicker closed 8 years ago

snicker commented 8 years ago

Compiled both protobuf and node-protobuf with G++ 4.2 on FreeBSD 9.2 and I get this error when attempting to use it:

Error: /usr/home/snicker/devel/node/protobuf-project/node_modules/node-protobuf/build/Release/protobuf.node: Undefined symbol "_ZN6google8protobuf15FieldDescriptor17kTypeToCppTypeMapE"

that seems to indicate that the protobuf lib and the node lib were compiled under difference circumstances. I can't figure out the problem, any ideas?

snicker commented 8 years ago

got this working by running the following: CC=gcc CXX='g++ -D_GLIBCXX_USE_C99 -v -lprotobuf' npm install node-protobuf

explictly asking gcc to include libprotobuf using the -lprotobuf command line argument did the trick.