It is my test project: i just copy the file rtpose.cpp to the project. then i write a CMakeLists.txt:
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(test)
SET(CMAKE_CXX_COMPILER "g++")
SET(CMAKE_BUILD_TYPE Debug)
SET(CMAKE_CXX_FLAGS "-std=c++0x")
find_package(CUDA REQUIRED)
INCLUDE_DIRECTORIES(
${CUDA_INCLUDE_DIRS}
/home/wsh/projects/openpose/include
/home/wsh/projects/openpose/3rdparty/caffe/include
)
ADD_EXECUTABLE(pose rtpose.cpp)
TARGET_LINK_LIBRARIES(pose
${CUDA_LIBSS}
/home/wsh/projects/openpose/build/lib/libopenpose.so
/home/wsh/projects/openpose/3rdparty/caffe/build/lib/libcaffe.so
)
Then make error is :
/home/wsh/projects/openpose/include/openpose/experimental/face/faceExtractor.hpp:48:29: error: ‘ResizeAndMergeCaffe’ was not declared in this scope
std::shared_ptr<ResizeAndMergeCaffe> spResizeAndMergeCaffe;
/home/wsh/projects/openpose/include/openpose/experimental/face/faceExtractor.hpp:49:29: error: ‘NmsCaffe’ was not declared in this scope
std::shared_ptr<NmsCaffe> spNmsCaffe;
......
I can run the examples successfully in openpose, but in my test project, it can not. i do not understand it. is it a problem between makefile and cmake? How can I use openpose in another project?
It is my test project: i just copy the file rtpose.cpp to the project. then i write a CMakeLists.txt: CMAKE_MINIMUM_REQUIRED(VERSION 2.8) PROJECT(test) SET(CMAKE_CXX_COMPILER "g++") SET(CMAKE_BUILD_TYPE Debug) SET(CMAKE_CXX_FLAGS "-std=c++0x") find_package(CUDA REQUIRED) INCLUDE_DIRECTORIES( ${CUDA_INCLUDE_DIRS} /home/wsh/projects/openpose/include /home/wsh/projects/openpose/3rdparty/caffe/include ) ADD_EXECUTABLE(pose rtpose.cpp) TARGET_LINK_LIBRARIES(pose ${CUDA_LIBSS} /home/wsh/projects/openpose/build/lib/libopenpose.so /home/wsh/projects/openpose/3rdparty/caffe/build/lib/libcaffe.so ) Then make error is : /home/wsh/projects/openpose/include/openpose/experimental/face/faceExtractor.hpp:48:29: error: ‘ResizeAndMergeCaffe’ was not declared in this scope std::shared_ptr<ResizeAndMergeCaffe> spResizeAndMergeCaffe;
/home/wsh/projects/openpose/include/openpose/experimental/face/faceExtractor.hpp:49:29: error: ‘NmsCaffe’ was not declared in this scope
std::shared_ptr<NmsCaffe> spNmsCaffe;
......
I can run the examples successfully in openpose, but in my test project, it can not. i do not understand it. is it a problem between makefile and cmake? How can I use openpose in another project?