赞
踩
- undefined symbol: __glewBindBuffer (./libA.so)
- undefined symbol: __glewBufferData (./libA.so)
- undefined symbol: __glewGenBuffers (./libA.so)
- undefined symbol: __glewBufferSubData (./libA.so)
环境:linux下,catkin_make编译,
问题出在A程序,A调用B库,B调用C库,原来A是直接通过源码调用C, 现在为了解偶,在A中通过B库调用C库,导致C库中符号找不到
在A程序的CMakeLists.txt中直接加入C库
- # GL or GLEW
- include_directories(SYSTEM ${CMAKE_HOME_DIRECTORY}/path-to/glew/18.04/include)
- link_directories(${CMAKE_HOME_DIRECTORY}/path-to/glew/18.04/${LIBDIR})
- set(GL_LIBS GL GLEW)
-
- target_link_libraries(${PROJECT_NAME}_ref
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。