-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
希望增加.cmake文件,方便使用CMakelist编译时引用 #70
Comments
target_link_libraries增加 -Wl,--start-group 和-Wl,--end-group参数可以实现随意顺序链接 ) |
在编译生成静态库之后,使用CMakelist链接静态库时,必须按顺序链接。才能编译成功,顺序如下:
add_executable(test src/main.cpp)
target_link_libraries(test
${catkin_LIBRARIES}
${LIB_DIR_ARCH}/cpp-tbox/lib/libtbox_main.a
${LIB_DIR_ARCH}/cpp-tbox/lib/libtbox_log.a
${LIB_DIR_ARCH}/cpp-tbox/lib/libtbox_terminal.a
${LIB_DIR_ARCH}/cpp-tbox/lib/libtbox_network.a
${LIB_DIR_ARCH}/cpp-tbox/lib/libtbox_eventx.a
${LIB_DIR_ARCH}/cpp-tbox/lib/libtbox_event.a
${LIB_DIR_ARCH}/cpp-tbox/lib/libtbox_util.a
${LIB_DIR_ARCH}/cpp-tbox/lib/libtbox_base.a
-lpthread
-ldl
)
The text was updated successfully, but these errors were encountered: