You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the reason is that when compiled as shared lib (dll on windows), Cdr_DllAPI is defined as __declspec( dllexport ) when compiling fastcdr and __declspec( dllimport ) when compiling fastrtps and includes fastcdr as a shared lib.
Then the included header file (for fastftps), is like this
Hi,
When fastcdr is compiled and installed, I continue to build fastrtps, (compile on Windows and set
-DBUILD_SHARED_LIBS=ON
),then I got lots of similar errors:
the reason is that when compiled as shared lib (dll on windows),
Cdr_DllAPI
is defined as__declspec( dllexport )
when compiling fastcdr and__declspec( dllimport )
when compiling fastrtps and includes fastcdr as a shared lib.Then the included header file (for fastftps), is like this
the error message says that the function is marked as
dllimport
but it has a function body (definition) at the same time, which is an error.The suggested change is to move the function body/definition from .h file to .cpp file.
I'd like to create a PR if the suggestion above is acceptable.
The text was updated successfully, but these errors were encountered: