compile: gPP-w-g-o. / bin/linux/main main.cpp-I. / include/-I. / voice/-L. / bin/linux/-L.. / lib/linux/-ldataBaseInterface-lmysqlclient-lhpr-llogsystem-ljson-lcurl-lmsc-lvoiceInterface-lxml
there is no exception in the compilation process, and the dynamic library cannot be found when executing main: . /.. / bin/linux/main: error while loading shared libraries: libhpr.so: cannot open shared object file: No such file or directory
if the terminal uses export or adds a dynamic library path to / etc/ld.so.conf, it can run normally.-L only works at compile time, or do you have to specify an additional dynamic library directory at run time?
know that the runtime library directory needs to be specified extra-Wl,--rpath