【问题标题】:log4cxx builds and compiles but when run gets UnsatisfiedLinkExceptionlog4cxx 构建和编译,但运行时得到 UnsatisfiedLinkException
【发布时间】:2012-09-07 12:58:51
【问题描述】:

我已将 log4cxx 日志记录添加到小型 C++ 包装器/JNI 桥。

最初它使用了大量的 printf 语句,但随着它开始被越来越多地使用,控制台开始阻塞,所以我想改用 log4cxx。

代码可以正常编译和构建。但是当我尝试运行一个名为 TestHarness 的 java 类时,我得到:

Exception in thread "main" java.lang.UnsatisfiedLinkError: test/libMyApp.so: test/libMyApp.so: undefined symbol: _ZTIN7log4cxx7helpers13ObjectPtrBaseE

我完全是 C++ 新手,不知道哪里出了问题。非常感谢任何帮助

【问题讨论】:

    标签: java c++ java-native-interface unsatisfiedlinkerror log4cxx


    【解决方案1】:

    原来这是因为我没有将一些共享对象复制到正确的目录(也没有更新我正在使用的文件)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-02-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-07-04
      相关资源
      最近更新 更多