[ros-users] compile error using rosmake

Morgan Quigley morganquigley at gmail.com
Tue May 4 19:30:37 UTC 2010


replacing your rosbuild_add_executable line with this should make it work:

rosbuild_add_executable(homography_generator
src/homography_generator.cpp src/CeilingNode.cpp)

the rosbuild_add_executable macro is a wrapper around CMake's
add_executable macro. Documentation here:
http://www.ros.org/wiki/rosbuild/CMakeLists

Cheers,
Morgan


On Tue, May 4, 2010 at 12:27 PM, Todd Anderson <tdansel88 at gmail.com> wrote:
> Ok, here is my CMakeLists.txt.  You are right but could you tell me what the
> syntax is for the fix?
> cmake_minimum_required(VERSION 2.4.6)
> include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
> # Set the build type.  Options are:
> #  Coverage       : w/ debug symbols, w/o optimization, w/ code-coverage
> #  Debug          : w/ debug symbols, w/o optimization
> #  Release        : w/o debug symbols, w/ optimization
> #  RelWithDebInfo : w/ debug symbols, w/ optimization
> #  MinSizeRel     : w/o debug symbols, w/ optimization, stripped binaries
> #set(ROS_BUILD_TYPE RelWithDebInfo)
> rosbuild_init()
> #set the default path for built executables to the "bin" directory
> set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
> #set the default path for built libraries to the "lib" directory
> set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
> #uncomment if you have defined messages
> rosbuild_genmsg()
> #uncomment if you have defined services
> rosbuild_gensrv()
> include_directories(include)
> #common commands for building c++ executables and libraries
> #rosbuild_add_library(${PROJECT_NAME} src/example.cpp)
> #target_link_libraries(${PROJECT_NAME} another_library)
> #rosbuild_add_boost_directories()
> #rosbuild_link_boost(${PROJECT_NAME} thread)
> #rosbuild_add_executable(surf src/find_obj.cpp)
> rosbuild_add_executable(homography_generator src/homography_generator.cpp)
> #target_link_libraries(example ${PROJECT_NAME})
>
> --
> Todd Anderson
> (919) 710-0546
> Washington University in St. Louis Class of 2011
> School of Engineering and Applied Sciences
>
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
>



More information about the ros-users mailing list