正在上传图片(0/1)

PSDK在linux虚拟机里运行 ,cmake一直报错

 0
手机看帖 0 1009
root@cuixiaoyuan-virtual-machine:/home/DJI/payload_SDK_V2.2.1-build.315/sample/platform/linux/manifold2/project/build# cmake ..
-- The C compiler identification is GNU 5.5.0
-- The CXX compiler identification is GNU 5.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:56 (target_link_libraries):
  Target "test_demo" of type EXECUTABLE may not be linked into another
  target.  One may link only to STATIC or SHARED libraries, or to executables
  with the ENABLE_EXPORTS property set.




我的cmakelist.txt是这样写的
cmake_minimum_required(VERSION 2.8)                                                            
project(test_demo)
。。。。。
。。。。。
## Outputs
50 add_executable(${CMAKE_PROJECT_NAME} test_demo
51         ${APP_SRC}
52         ${COMMON_SRC}
53         ${SAMPLE_SRC}
54         )
55 target_link_libraries(${CMAKE_PROJECT_NAME} test_demo),请教一下各位大佬,是不是最后这句话写的有问题?
评论
上传
你需要登录之后才能回帖    登录 | 注册
收藏 点赞 评论
分享至:
回复:
上传
取消 评论
快速回复 返回顶部 返回列表