PKG linked to static library linking error
I'm using ROS Indigo on Ubuntu 14.04 and the static library is a planner, namely the APPL Offline implements the SARSOP algorithm. I would like to run the planner in a ROS node and there is a static library created after compiling the appl code. While building the package I get an error. In the source code I include one header and create an object (solver of a pomdp).
My CMakeFile looks like:
cmake_minimum_required(VERSION 2.8.3)
project(pomdp_planner)
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
)
SET(APPL_LIB_DIR /home/user/UTwork/Planning/appl/branche/POP/src)
SET(SOURCES ${PROJECT_SOURCE_DIR}/src/main.cpp )
SET(HEADERS ${APPL_LIB_DIR}/OnlineOPSolver/OnlineOPsolver/solverOP_lib.hpp
${APPL_LIB_DIR}/OfflineSolver/GlobalResource.h
${APPL_LIB_DIR}/OfflineSolver/solverUtils.h
${APPL_LIB_DIR}/Parser/Cassandra/Parser.h
${APPL_LIB_DIR}/Parser/Cassandra/POMDP.h
${APPL_LIB_DIR}/Parser/ParserSelector.h
${APPL_LIB_DIR}/Models/MOMDP/MOMDP.h
${APPL_LIB_DIR}/Algorithms/SARSOP/SARSOP.h
${APPL_LIB_DIR}/Algorithms/OPMDP/OPMDP.h
${APPL_LIB_DIR}/Bounds/BackupAlphaPlaneMOMDP.h
${APPL_LIB_DIR}/Bounds/BackupBeliefValuePairMOMDP.h
${APPL_LIB_DIR}/OnlineOPSolver/OnlineOPsolver/dataLogger.h
${APPL_LIB_DIR}/Bounds/FastInfUBInitializer.h
${APPL_LIB_DIR}/Bounds/FullObsUBInitializer.h
${APPL_LIB_DIR}/Utils/CPTimer.h
${APPL_LIB_DIR}/Core/BeliefCache.h
)
SET(APPL_DIR ${APPL_LIB_DIR}/OnlineOPSolver/OnlineOPsolver
${APPL_LIB_DIR}/OfflineSolver
${APPL_LIB_DIR}/Parser/Cassandra
${APPL_LIB_DIR}/Parser/
${APPL_LIB_DIR}/Models/MOMDP
${APPL_LIB_DIR}/Algorithms/SARSOP
${APPL_LIB_DIR}/Algorithms/OPMDP
${APPL_LIB_DIR}/Bounds
${APPL_LIB_DIR}/Bounds
${APPL_LIB_DIR}/Utils
${APPL_LIB_DIR}/Core
${APPL_LIB_DIR}/MathLib
${APPL_LIB_DIR}/Algorithms
${APPL_LIB_DIR}/Parser/POMDPX
)
SET(LINKER_FLAG "-std=c++11 -fpermissive")
add_definitions(${LINKER_FLAG})
include_directories(${APPL_DIR})
add_executable(${PROJECT_NAME} ${SOURCES} ${HEADERS})
add_dependencies(${PROJECT_NAME} ${catkin_EXPORTED_TARGETS} )
target_link_libraries(${PROJECT_NAME} ${ROS_LIBRARIES} ${catkin_LIBRARIES} ${APPL_LIB_DIR}/libappl.a)
At linking phase I got an error catkin build --this --force-cmake -G"Eclipse CDT4 - Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug
:
Starting ==> pomdp_planner
[pomdp_planner] ==> '/home/elod/catkin_ws/build/pomdp_planner/build_env.sh /usr/bin/make --jobserver-fds=3,5 -j' in '/home/elod/catkin_ws/build/pomdp_planner'
[ 0%] [ 0%] [ 0%] Built target std_msgs_generate_messages_py
Built target roscpp_generate_messages_lisp
Built target roscpp_generate_messages_cpp
[ 0%] Built target roscpp_generate_messages_py
[ 0%] [ 0%] Built target rosgraph_msgs_generate_messages_py
Built target rosgraph_msgs_generate_messages_cpp
[ 0%] Built target rosgraph_msgs_generate_messages_lisp
[ 0%] Built target std_msgs_generate_messages_cpp
[ 0%] Built target std_msgs_generate_messages_lisp
[100%] Building CXX object CMakeFiles/pomdp_planner.dir/src/main.cpp.o
In file included from /opt/ros/indigo/include/ros/transport_hints.h:34:0,
from /opt/ros/indigo/include/ros/subscribe_options.h:33,
from /opt/ros/indigo/include/ros/node_handle.h:41,
from /opt/ros/indigo/include/ros/ros.h:45,
from /home/elod/catkin_ws/src/solver/pomdp_planner/src/main.cpp:1:
/usr/include/boost/lexical_cast.hpp:75:49: error: expected initializer before : token
class BOOST_SYMBOL_VISIBLE bad_lexical_cast :
^
/home/elod/catkin_ws/src/solver/pomdp_planner/src/main.cpp:21:1: error: expected } at end of input
}
^
make[2]: *** [CMakeFiles/pomdp_planner.dir/src/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/pomdp_planner.dir/all] Error 2
make: *** [all] Error 2
[pomdp_planner] <== '/home/elod/catkin_ws/build/pomdp_planner/build_env.sh /usr/bin/make --jobserver-fds=3,5 -j' failed with return code '2'
Failed <== pomdp_planner [ 2.5 seconds ]
[build] There were '1' errors:
Failed to build package 'pomdp_planner' because the following command:
# Command to reproduce:
cd /home/elod/catkin_ws/build/pomdp_planner && /home/elod/catkin_ws/build/pomdp_planner/build_env.sh /usr/bin/make --jobserver-fds=3,5 -j; cd -
# Path to log:
cat /home ...