Unable to build DLL

2 posts / 0 new
Last post
Offline
Last seen: 9 years 1 month ago
Joined: 08/28/2015
Posts: 3
Unable to build DLL

I've created the simple hello idl project code and put it into a Win7 VS2010 x64 DLL project. My goal is to export the code for use by another app at run-time. I see in the generated code that getting the dllexport declspec requires RTI_WIN32 and NDDS_USER_DLL_EXPORT to be defined. However, when I define NDDS_USER_DLL_EXPORT I get 3 types of warning/errors.

The first warning is C4275: non-dll interface class DDSDomainEntity used as base for dll-interface class DDSWriter. I get the same warning for the DDSDataReader.

The second warning I get about a hundred of and all are for DDSTypeSupport, DDSDataReader and DDSDataWriter. They all say the same sort of thing though: LNK217 locally defined symbol <X> imported.

Finally, I get link errors for DDSTypeSupport, DDSDataReader and DDSDataWriter (2 for each) saying that the constructor and operator= symbols were not found.

How do I build a DLL that will export these symbols.

Thanks in advance.

Keywords:
jwillemsen's picture
Offline
Last seen: 3 years 6 months ago
Joined: 09/24/2013
Posts: 55

When you want to compile the generated code into a DLL on Windows you have to set the RTI_WIN32, NDDS_DLL_VARIABLE, and NDDS_USER_DLL_EXPORT defines, looks you lack the second.

We also get the warning C4275 on the generated code, we reported that to RTI some time ago but I am now aware of a fix by RTI yet.