moai / luamongo

Lua driver for mongodb
https://github.com/moai/luamongo
MIT License
170 stars 58 forks source link

Undefined symbol when loading #41

Closed requilence closed 9 years ago

requilence commented 9 years ago

Hello! Can't resolve this problem... C++ driver 0.9.0

root@HO:/home/tg/luamongo2# lua -v
Lua 5.2.3  Copyright (C) 1994-2013 Lua.org, PUC-Rio
root@HO:/home/tg/luamongo2# make
make[1]: Entering directory `/home/tg/luamongo2'
g++ -Wall -w -g -O2 -shared -fPIC -I/usr/include/mongo -I/usr/include/lua5.2   -I/usr/include/mongo-client -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include   main.o mongo_bsontypes.o mongo_dbclient.o mongo_replicaset.o mongo_connection.o mongo_cursor.o mongo_gridfile.o mongo_gridfs.o mongo_gridfschunk.o mongo_query.o utils.o mongo_cxx_extension.o mongo_gridfilebuilder.o -o mongo.so -llua5.2   -lmongoclient -lssl -lboost_thread -lboost_filesystem -lrt
make[1]: Leaving directory `/home/tg/luamongo2'
root@HO:/home/tg# lua test.lua
lua: error loading module 'mongo' from file './mongo.so':
    ./mongo.so: undefined symbol: _ZNK5mongo3OID8toStringEv
stack traceback:
    [C]: in ?
    [C]: in function 'require'
    test.lua:6: in main chunk
    [C]: in ?
root@HO:/home/tg# echo _ZNK5mongo3OID8toStringEv | c++filt 
mongo::OID::toString() const
requilence commented 9 years ago

Solved. mongo/client headers was taken from other place (from the one installed via apt-get)