JNI 运行错误 symbol lookup error
/usr/lib/jvm/java-6-openjdk-amd64/bin/java -Djava.library.path=../cef-swt-gtk-linux-x86_64-native/ -cp ./target/classes:./target/test-classes:$HOME/.m2/repository/org/eclipse/swt/org.eclipse.swt.gtk.linux.x86_64/3.7.2/org.eclipse.swt.gtk.linux.x86_64-3.7.2.jar com.zxg.cef.swt.test.TestWindow
错误:
/usr/lib/jvm/java-6-openjdk-amd64/bin/java: symbol lookup error: /home/xxx/code/workspace/eclipse_workspace/cef-swt-gtk-linux-x86_64-native/libcef-swt-gtk-linux-x86_64.so: undefined symbol: _Z13CefInitializeRK11CefMainArgsRK13CefStructBaseI17CefSettingsTraitsE9CefRefPtrI6CefAppE
makefile:
OBJS = cef-swt-gtk-linux-x86_64.o JAVA_HOME = /usr/lib/jvm/java-6-openjdk-amd64 CXXFLAGS = -fPIC -Wall -fmessage-length=0 -I$(JAVA_HOME)/include -I/usr/local/include/cef3 `pkg-config --cflags gtk+-2.0` LIBS = -lcef -lffmpegsumo `pkg-config --libs gtk+-2.0` LDFLAGS := -shared -fpic -Wl,-rpath,/usr/local/lib CXX = g++ TARGET = libcef-swt-gtk-linux-x86_64.so $(TARGET): $(OBJS) $(CXX) $(LDFLAGS) -o $(TARGET) $(OBJS) $(LIBS) all: $(TARGET) ../cef-swt-gtk-linux-x86_64/target/classes/com/zxg/cef/swt/Cef.class: ../cef-swt-gtk-linux-x86_64/src/main/java/com/zxg/cef/swt/Cef.java mvn -f ../cef-swt-gtk-linux-x86_64/pom.xml compile com_zxg_cef_swt_Cef.h: ../cef-swt-gtk-linux-x86_64/target/classes/com/zxg/cef/swt/Cef.class $(JAVA_HOME)/bin/javah -classpath ../cef-swt-gtk-linux-x86_64/target/classes com.zxg.cef.swt.Cef cef-swt-gtk-linux-x86_64.o: cef-swt-gtk-linux-x86_64.cpp com_zxg_cef_swt_Cef.h $(CXX) $(CXXFLAGS) -c -o cef-swt-gtk-linux-x86_64.o cef-swt-gtk-linux-x86_64.cpp clean: rm -f $(OBJS) $(TARGET)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
动态库存放的位置是一样的
http://blog.chinaunix.net/uid-21744621-id-21472.html