我在OpenSuse 12.3上静态构建了Log4cxx,但是当我尝试在我的Qt项目中构建它时,它在链接时失败了。根据apr,apr-util和log4cxx的顺序,错误会有所不同,但是如果我使用此顺序构建,那么我认为这是一些最相关的链接错误 unix:!macx:LIBS + = - L $$ LOG4CXX_PATH / lib -lapr-1 -laprutil-1 -llog4cxx :
../../../External/Linux/static/log4cxx/lib/liblog4cxx.a(objectptr.o): In function `log4cxx::helpers::ObjectPtrBase::exchange(void**, void*)':
objectptr.cpp :(。text + 0x124):对apr_atomic_xchg32'
../../../External/Linux/static/log4cxx/lib/liblog4cxx.a(stringhelper.o): In function
log4cxx :: helpers :: StringHelper :: toInt64(std :: string const&)'的未定义引用:
stringhelper.cpp :(。text + 0x5d0):对apr_atoi64'
../../../External/Linux/static/log4cxx/lib/liblog4cxx.a(pool.o): In function
log4cxx :: helpers :: Pool :: Pool()'的未定义引用:
pool.cpp :(。text + 0x3a):未定义引用apr_pool_create_ex'
../../../External/Linux/static/log4cxx/lib/liblog4cxx.a(pool.o): In function
log4cxx :: helpers :: Pool :: ~Pool()':
pool.cpp :(。text + 0xfc):对'apr_pool_destroy'的未定义引用