Thanks for the prompt reply but I Still get my unresolved symbols.
>BallTopic.obj : error LNK2001: unresolved external symbol __imp_DDS_LOG_MEMORY_ALLOCATED_dd
1>BallTopic.obj : error LNK2001: unresolved external symbol __imp_DDS_LOG_SET_FAILURE_s
1>BallTopicPlugin.obj : error LNK2019: unresolved external symbol RTIOsapiHeap_freeMemoryInternal referenced in function BallPluginSupport_create_data_ex
1>BallTopicPlugin.obj : error LNK2019: unresolved external symbol RTIOsapiHeap_reallocateMemoryInternal referenced in function BallPluginSupport_create_data_ex
Would it be possible to post what the issue with x64 vs 32-bit Windows? I am trying to get a basic 64-bit service up on VS2013, and getting linker resolution errors no matter what I put as pre-processor defines.
Thanks, Tim
Here are the defines from the VS2013 Project file:
The VS - express editions have traditionally been 32bit only. I know they changed that recently, but you may need to download 64bit libraries from Microsoft before you can create 64bit applications.
Using Visual Studio 2015 RC I do get the following warnings, I do use RTI_WIN32, NDDS_DLL_VARIABLE, and NDDS_USER_DLL_EXPORT as defines when compiling the generated code
ndds.5.1.0\include\ndds/dds_cpp/dds_cpp_publication.h(323): warning C4275: non dll-interface class 'DDSDomainEntity' used as base for dll-interface class 'DDSDataWriter' ndds.5.1.0\include\ndds/dds_cpp/dds_cpp_infrastructure.h(284): note: see declaration of 'DDSDomainEntity' ndds.5.1.0\include\ndds/dds_cpp/dds_cpp_publication.h(323): note: see declaration of 'DDSDataWriter' ndds.5.1.0\include\ndds/dds_cpp/dds_cpp_subscription.h(356): warning C4275: non dll-interface class 'DDSDomainEntity' used as base for dll-interface class 'DDSDataReader' ndds.5.1.0\include\ndds/dds_cpp/dds_cpp_infrastructure.h(284): note: see declaration of 'DDSDomainEntity' ndds.5.1.0\include\ndds/dds_cpp/dds_cpp_subscription.h(356): note: see declaration of 'DDSDataReader'
Did you ever get a reply about these C4275 warnings in VS 2015?
I am using VS 2017 with Connext Pro 5.3.0.1, and I am facing a similar problem, with a slightly different warning code.
I am trying to export the types rtiddsgen has created for me.
Without NDDS_USER_DLL_EXPORT, no type is exported.
With the NDDS_USER_DLL_EXPORT precompilation directive, the types are exported, but the following warnings pops up when compiling: C:\Program Files\rti_connext_dds-5.3.0\include\ndds\hpp\dds/core/String.hpp(42): warning C4251: 'std::_String_alloc<std::_String_base_types<_Elem,_Alloc>>::_Mypair': class 'std::_Compressed_pair<std::allocator,std::_String_val<std::_Simple_types<_Ty>>,true>' needs to have dll-interface to be used by clients of class 'std::_String_alloc<std::_String_base_types<_Elem,_Alloc>>'1> with1> [1> _Elem=char,1> _Alloc=std::allocator1> ]1> and1> [1> _Ty=char1> ]1> and1> [1> _Elem=char,1> _Alloc=std::allocator1> ]
Hi,
To create a basic DLL you will need the following flags:
WIN32_LEAN_AND_MEAN;WIN32;_WINDOWS;_USRDLL;NDDS_DLL_VARIABLE;RTI_WIN32;RTI_ENDIAN_LITTLE;
You will also have to add the include directories $(NDDSHOME)\include and $(NDDSHOME)\include\ndds.
Best,
Fernando.
Thanks for the prompt reply but I Still get my unresolved symbols.
>BallTopic.obj : error LNK2001: unresolved external symbol __imp_DDS_LOG_MEMORY_ALLOCATED_dd
1>BallTopic.obj : error LNK2001: unresolved external symbol __imp_DDS_LOG_SET_FAILURE_s
1>BallTopicPlugin.obj : error LNK2019: unresolved external symbol RTIOsapiHeap_freeMemoryInternal referenced in function BallPluginSupport_create_data_ex
1>BallTopicPlugin.obj : error LNK2019: unresolved external symbol RTIOsapiHeap_reallocateMemoryInternal referenced in function BallPluginSupport_create_data_ex
I link with nddscpp.lib;nddsc.lib;nddscore.lib.
What am I missing?
Ben
Hi Ben,
Do you get the error when using the library that you created or while creating that new library?
Check that you have the RTI libraries in your PATH (in Windows), or in the LD_LIBRARY_PATH (in Linux)
Jorge
Hi Jorge,
It was a link time and i figured it out. It was as 64bits vs 32bits problem.
Thank you for your time.
Ben
Hi all,
Would it be possible to post what the issue with x64 vs 32-bit Windows? I am trying to get a basic 64-bit service up on VS2013, and getting linker resolution errors no matter what I put as pre-processor defines.
Thanks,
Tim
Here are the defines from the VS2013 Project file:
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
...
<PreprocessorDefinitions>NDDS_DLL_VARIABLE;RTI_WIN32;WIN32;_DEBUG;_WINDOWS;_USRDLL;TESTDLL3_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(NDDSHOME)\include;$(NDDSHOME)\include\ndds;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
...
<AdditionalDependencies>nddscpp.lib;nddsc.lib;nddscore.lib;netapi32.lib;advapi32.lib;user32.lib;WS2_32.lib;;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(NDDSHOME)\lib\x64Win64VS2013;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
VS2013 or VS2013 Express?
Express
The VS - express editions have traditionally been 32bit only. I know they changed that recently, but you may need to download 64bit libraries from Microsoft before you can create 64bit applications.
Using Visual Studio 2015 RC I do get the following warnings, I do use RTI_WIN32, NDDS_DLL_VARIABLE, and NDDS_USER_DLL_EXPORT as defines when compiling the generated code
ndds.5.1.0\include\ndds/dds_cpp/dds_cpp_publication.h(323): warning C4275: non dll-interface class 'DDSDomainEntity' used as base for dll-interface class 'DDSDataWriter'
ndds.5.1.0\include\ndds/dds_cpp/dds_cpp_infrastructure.h(284): note: see declaration of 'DDSDomainEntity'
ndds.5.1.0\include\ndds/dds_cpp/dds_cpp_publication.h(323): note: see declaration of 'DDSDataWriter'
ndds.5.1.0\include\ndds/dds_cpp/dds_cpp_subscription.h(356): warning C4275: non dll-interface class 'DDSDomainEntity' used as base for dll-interface class 'DDSDataReader'
ndds.5.1.0\include\ndds/dds_cpp/dds_cpp_infrastructure.h(284): note: see declaration of 'DDSDomainEntity'
ndds.5.1.0\include\ndds/dds_cpp/dds_cpp_subscription.h(356): note: see declaration of 'DDSDataReader'
Hi,
Did you ever get a reply about these C4275 warnings in VS 2015?
I am using VS 2017 with Connext Pro 5.3.0.1, and I am facing a similar problem, with a slightly different warning code.
I am trying to export the types rtiddsgen has created for me.
C:\Program Files\rti_connext_dds-5.3.0\include\ndds\hpp\dds/core/String.hpp(42): warning C4251: 'std::_String_alloc<std::_String_base_types<_Elem,_Alloc>>::_Mypair': class 'std::_Compressed_pair<std::allocator,std::_String_val<std::_Simple_types<_Ty>>,true>' needs to have dll-interface to be used by clients of class 'std::_String_alloc<std::_String_base_types<_Elem,_Alloc>>'1> with1> [1> _Elem=char,1> _Alloc=std::allocator1> ]1> and1> [1> _Ty=char1> ]1> and1> [1> _Elem=char,1> _Alloc=std::allocator1> ]
Any suggestion would be greatly appreciated!
Thanks!
Reureu
Yes, the C4275 we reported have been fixed by RTI in their latest release. I haven't seen the ones you reported.
Thank you jwillemsen!
Do you still have only RTI_WIN32, NDDS_DLL_VARIABLE, and NDDS_USER_DLL_EXPORT as "custom" precompilation directives?
Mine are:
Maybe it's related to VS 2017?
We are using