-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix static compilation on Windows #40
Conversation
+1. urdfdom probably needs the same fix |
It looks like this fix could needed throughout all ROS projects that link against console_bridge. So far, I got the following errors while statically linking rosbag_storage, cpp_common, and tf2 in a MEX project:
I think what is going on here is that, because The fix --at least conceptually-- is still the same. However, it needs to be applied to EDIT:
|
@jacquelinekay who from the ROS team could review this? |
I know that this is a old PR, but given that I am fighting quite a bit with this kind of issues while working on
This is not scalable, even because it is totally legitimate to link a shared library to a "static" In my little experience the most robust solution is to generate (at configure time) an header (tipically called An alternative solution for simple cases such as this one is to keep two headers in the source tree (one defining |
In #43 |
Is this needed anymore since #43 was merged? |
I'm going to close this since I think it is not needed since #43 was merged. Please re-open if that is not the case. |
Currently, compiling as a static library by setting
BUILD_SHARED_LIBS=OFF
fails on Windows, and the reason is thatCONSOLE_BRIDGE_STATIC
is not defined as it's supposed to in that case. A simple fix is included here.The log for the build failure is below