ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

unresolved external symbol "bool ros::console::g_initialized"

asked 2012-07-03 23:38:09 -0500

aperez gravatar image

updated 2014-04-20 14:09:44 -0500

ngrennan gravatar image

Hi all,

I'm creating a small package in Windows using the Msvc Build Environment - Fuerte. I have run the sdk demo and it executes very well. But when I have wrote my own application and I try to compile it, the linker throws me the error: unresolved external symbol "bool ros::console::g_initialized"

I have checked the include folder and the lib folder and the rosconsole.lib but I can't produce the executable. I have looking for the g_initiaized variable but I only found the extern definition. I can't found the real declaration.

Any help will be useful,

Alxperez

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2012-07-04 04:46:54 -0500

aperez gravatar image

I answer my own question. You need to include the ROS_BUILD_SHARED_LIBS definition in order to uses the dlls instead of the static libraries.

I have generated the msvc project using a catkinized cmake inside the console2. This project doesn't have some configurations like folder include (rosdeps), or some additional preprocessor definitions like BOOST_LIB_TOOLSET="vc" in order to correctly find the boost libraries and the ROS_BUILD_SHARED_LIBS definition that uses the dlls.

Once this definitions is added, and the rosdep folder is included, the program compiles and links very well.

edit flag offensive delete link more
0

answered 2014-02-22 02:28:52 -0500

Bardo91 gravatar image

Hi Aperez,

I've got the same trouble compiling my code, I added both ros and rosdep includes and rosconsole.lib, but it still crashing while linking. I'm using vs12. I tried with the preprocessor definitions but I got the same. How did you finally manage the error?

Thanks in advance

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-07-03 23:38:09 -0500

Seen: 1,629 times

Last updated: Feb 22 '14