linker - Linking with libmaxminddb -


I am trying to replace libgeoip with libmaxminddb. I am using the Lima build system, while the link fails in this undefined context, but -lmaxminddb exists.

liblua_modules.a is a library that calls MMDB_open ().

  Linking to XXX executable SOURCE server CD / home / pyronov / suckerserv / trunk / suckerserv-v5 / release_build / src & amp; Amp; / usr / bin / cmake -ememake_link_script CMakeFiles / sauer_server.dir / link.txt --verbose = 1 / usr / bin / c ++ CMakeFiles / sauer_server.dir / engine / server.cpp.o CMakeFiles / sauer_server.dir / fpsgame / server.cpp.o CMakeFiles / sauer_server.dir / hopmod / netbans.cpp.o CMakeFiles / sauer_server.dir / hopmod / startup.cpp.o CMakeFiles / sauer_server.dir / hopmod / scheduler.cpp.o CMakeFiles / sauer_server.dir / Hopmode / lua CPPO CMakeFiles / sauer_server.dir / hopmod / core_bindings.cpp.o CMakeFiles / sauer_server.dir / hopmod / events.cpp.o CMakeFiles / sauer_server.dir / hopmod / signals.cpp.o -o sauer_server - rdynamic -lrt -lz libsauertools.so liblua_modules.a -lboost_thread -lenet libsauertools.so -lrt -lz -llua -lmaxminddb fungi / src / net / http / libfungu_http.a-pathred fungi / src / libfungu_string.a -lboost_system -lssl -lcrypto -lenet -Wl, -rpath, / home / piernov / suckerserv / trunk / suckerser V-v5 / release_build / src: liblua_modules.a (geoip.cpp.o): `load_geoip_database (lua_State *) 'in the function: geoip CPP :(. Text + 0x13e): Undefined reference `MMDB_open (chaR` const *, unsigned int, MMDB_s *) 'geoip.cpp :(. Text + 0x153): Undefined reference for` MMDB_strorror (int)'    

Did you consider changing the link order?

  target_link_libraries (foo maxminddb object 1 object object 3)   

Instead you can help with your problem. Maxminddb is back and forth so that the linker already knows what function works for target_link_libraries (foo object1 object2 maxminddb)

note : If libmaxminddb < / Code> needs the other libraries themselves, liba and libb still maxminddb

  target_link_libraries (Be sure to keep them behind the foo object1 object2 object3) maxminddb liba libb)    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -