This repository has been archived by the owner on Jul 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 49
Cookbook discussion #33
Comments
Hi @traversaro, Visibility Warning as Errors Thank you! |
traversaro
added a commit
to traversaro/ROSOnWindows
that referenced
this issue
Nov 3, 2018
As discussed in ms-iot#33
With your change and mine, I think we have resolved this issue. Please reopen if you believe we need further clarification |
This was referenced Dec 14, 2018
6 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
Not really a bug, just a couple suggestion for the Cookbook available at https://github.com/ms-iot/ROSOnWindows/blob/master/Porting/Cookbook.md . If you agree with them, I would be happy to provide a PR for modifying the Cookbook.
Visibility macros
For dealing with visibility issues, the cookbook suggests to use the
CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS
CMake property.However, the fallback solution of directly declaring the visibility macros
LIB_EXTERN
has some drawbacks in its current form:LIB_EXTERN
andBUILDING_LIB
macro need to be specific to each shared library (so if a package contains two shared libraries, you need one macro for each shared library). See https://bitbucket.org/osrf/gazebo/issues/2262/symbol-visibility-issues-in-windows for a Gazebo issue related to this. It may be worth to mention that CMake provides theDEFINE_SYMBOL
target property to define theBUILDING_LIB
-like macro, that is by default initialized to<targetName>_EXPORTS
.LIB_EXTERN
andBUILDING_LIB
macro would break compilation of static libraries in Windows, see Fix static compilation on Windows ros/console_bridge#40 .Threat warning an errors
The suggest settings for warnings ( https://github.com/ms-iot/ROSOnWindows/blob/master/Porting/Cookbook.md#all-warnings ) is to include the
/WX
flag, that will make every warning an error. This may be problematic because if a new version of Visual Studio that introduces a new warning is available, the compilation could fail. Furthermore, it is inconsistent with the corresponding GCC warnings-Wall -Wextra
, that do not contain-Werror
.The text was updated successfully, but these errors were encountered: