Skip to content
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 warnings about calling conventions #99

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions rcldotnet/rcldotnet_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,19 @@
#if defined(_MSC_VER)
#define RCLDOTNET_EXPORT __declspec(dllexport)
#define RCLDOTNET_IMPORT __declspec(dllimport)
#define RCLDOTNET_CDECL __cdecl
#if defined(_M_IX86)
#define RCLDOTNET_CDECL __cdecl
#else
#define RCLDOTNET_CDECL
#endif
#elif defined(__GNUC__)
#define RCLDOTNET_EXPORT __attribute__((visibility("default")))
#define RCLDOTNET_IMPORT
#define RCLDOTNET_CDECL __attribute__((__cdecl__))
#if defined(__i386__)
#define RCLDOTNET_CDECL __attribute__((__cdecl__))
#else
#define RCLDOTNET_CDECL
#endif
#else
#define RCLDOTNET_EXPORT
#define RCLDOTNET_IMPORT
Expand Down
2 changes: 0 additions & 2 deletions rcldotnet_examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ set(_assemblies_dep_dlls
${std_srvs_ASSEMBLIES_DLL}
)

message("Included assemblies: ${_assemblies_dep_dlls}")

add_dotnet_executable(rcldotnet_talker
RCLDotnetTalker.cs
INCLUDE_DLLS
Expand Down
12 changes: 10 additions & 2 deletions rosidl_generator_dotnet/resource/msg.h.em
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,20 @@ msg_prefix = "RCLDOTNET_{0}_{1}_{2}".format(package_name, '_'.join(message.struc
// Microsoft
#define @(msg_prefix)_EXPORT __declspec(dllexport)
#define @(msg_prefix)_IMPORT __declspec(dllimport)
#define @(msg_prefix)_CDECL __cdecl
#if defined(_M_IX86)
#define @(msg_prefix)_CDECL __cdecl
#else
#define @(msg_prefix)_CDECL
#endif
#elif defined(__GNUC__)
// GCC
#define @(msg_prefix)_EXPORT __attribute__((visibility("default")))
#define @(msg_prefix)_IMPORT
#define @(msg_prefix)_CDECL __attribute__((__cdecl__))
#if defined(__i386__)
#define @(msg_prefix)_CDECL __attribute__((__cdecl__))
#else
#define @(msg_prefix)_CDECL
#endif
#else
// do nothing and hope for the best?
#define @(msg_prefix)_EXPORT
Expand Down
12 changes: 10 additions & 2 deletions rosidl_generator_dotnet/resource/srv.h.em
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,20 @@ srv_prefix = "RCLDOTNET_{0}_{1}_{2}".format(package_name, '_'.join(service.names
// Microsoft
#define @(srv_prefix)_EXPORT __declspec(dllexport)
#define @(srv_prefix)_IMPORT __declspec(dllimport)
#define @(srv_prefix)_CDECL __cdecl
#if defined(_M_IX86)
#define @(srv_prefix)_CDECL __cdecl
#else
#define @(srv_prefix)_CDECL
#endif
#elif defined(__GNUC__)
// GCC
#define @(srv_prefix)_EXPORT __attribute__((visibility("default")))
#define @(srv_prefix)_IMPORT
#define @(srv_prefix)_CDECL __attribute__((__cdecl__))
#if defined(__i386__)
#define @(srv_prefix)_CDECL __attribute__((__cdecl__))
#else
#define @(srv_prefix)_CDECL
#endif
#else
// do nothing and hope for the best?
#define @(srv_prefix)_EXPORT
Expand Down