I am able to build examples in Cyclone DDS with Debug/x64 (output type is DLL ), I need to build them in Release/X64, in both builds shows the same 3 errors when I open the examples code but build always all succeed, (VS2017)
but in debug, output DLLs works fines, in release DLLs do not work
Severity Code Description Project File Line Suppression State
Error (active) E1097 unknown attribute "no_init_all"
ddscxxHelloworldSubscriberDLL C:\Program Files (x86)\Windows
Kits\10\Include\10.0.19041.0\um\winnt.h 3901
Severity Code Description Project File Line Suppression State
Error (active) E0090 function returning function is not allowed
ddscxxHelloworldSubscriberDLL
C:\Users\king\Downloads\DDS_2017_Build\cyclonedds_cxx_ins_dir_2017\include\ddscxx\dds\sub\detail\TDataReaderImpl.hpp 186
Severity Code Description Project File Line Suppression State
Error (active) E0090 function returning function is not allowed
ddscxxHelloworldSubscriberDLL
C:\Users\king\Downloads\DDS_2017_Build\cyclonedds_cxx_ins_dir_2017\include\ddscxx\dds\sub\detail\TDataReaderImpl.hpp 318
Github page says
Note that the default build type is a release build with debug information included (RelWithDebInfo),
which is generally the most convenient type of build to use from applications because of a good mix
between performance and still being able to debug things. If you'd rather have a Debug or pure
Release build, set CMAKE_BUILD_TYP
And I have followed the default installation which is RelWithDebInfo
Should I build CyclonesDDS installation with -DCMAKE_BUILD_TYP=RELEASE in order to build my example code in Release/x64 mode? or should I modify the example codes?
Output window on release x64 build
ld All started: Project: ZERO_CHECK, Configuration: Release x64 ------
2>------ Rebuild All started: Project: startClient, Configuration: Release x64 ------
3>------ Rebuild All started: Project: startServer, Configuration: Release x64 ------
1>Checking Build System
4>------ Rebuild All started: Project: isocpp_idlpp, Configuration: Release x64 ------
4>Building Custom Rule C:/Users/king/Downloads/DDS_2017_Build/cyclonedds_cxx_ins_dir_2017/DDS_3_15/helloworldDLLsource/CMakeLists.txt
5>------ Rebuild All started: Project: ddscxxHelloWorldData_lib_idl_isocpp_generate, Configuration: Release x64 ------
3>startServer.cpp
2>startClient.cpp
3> Creating library C:\Users\king\Downloads\DDS_2017_Build\cyclonedds_cxx_ins_dir_2017\DDS_3_15\DDS_DLL_PROJECT_2017\x64\Release\startServer.lib and object C:\Users\king\Downloads\DDS_2017_Build\cyclonedds_cxx_ins_dir_2017\DDS_3_15\DDS_DLL_PROJECT_2017\x64\Release\startServer.exp
3>Generating code
3>All 14 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
3>Finished generating code
2> Creating library C:\Users\king\Downloads\DDS_2017_Build\cyclonedds_cxx_ins_dir_2017\DDS_3_15\DDS_DLL_PROJECT_2017\x64\Release\startClient.lib and object C:\Users\king\Downloads\DDS_2017_Build\cyclonedds_cxx_ins_dir_2017\DDS_3_15\DDS_DLL_PROJECT_2017\x64\Release\startClient.exp
2>Generating code
2>All 14 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
2>Finished generating code
3>startServer.vcxproj -> C:\Users\king\Downloads\DDS_2017_Build\cyclonedds_cxx_ins_dir_2017\DDS_3_15\DDS_DLL_PROJECT_2017\x64\Release\startServer.exe
5>Running isocpp_idlpp on HelloWorldData.idl
2>startClient.vcxproj -> C:\Users\king\Downloads\DDS_2017_Build\cyclonedds_cxx_ins_dir_2017\DDS_3_15\DDS_DLL_PROJECT_2017\x64\Release\startClient.exe
5>Compiling C:\Users\king\Downloads\DDS_2017_Build\cyclonedds_cxx_ins_dir_2017\DDS_3_15\helloworldDLLsource\HelloWorldData.idl
5>Building Custom Rule C:/Users/king/Downloads/DDS_2017_Build/cyclonedds_cxx_ins_dir_2017/DDS_3_15/helloworldDLLsource/CMakeLists.txt
5>ANTLR Tool version 4.4 used for code generation does not match the current runtime version 4.5ANTLR Tool version 4.4 used for code generation does not match the current runtime version 4.5
6>------ Rebuild All started: Project: ddscxxHelloworldPublisherDLL, Configuration: Release x64 ------
7>------ Rebuild All started: Project: ddscxxHelloworldSubscriberDLL, Configuration: Release x64 ------
7>Building Custom Rule C:/Users/king/Downloads/DDS_2017_Build/cyclonedds_cxx_ins_dir_2017/DDS_3_15/helloworldDLLsource/CMakeLists.txt
6>Building Custom Rule C:/Users/king/Downloads/DDS_2017_Build/cyclonedds_cxx_ins_dir_2017/DDS_3_15/helloworldDLLsource/CMakeLists.txt
7>subscriber.cpp
6>publisher.cpp
6>HelloWorldData.cpp
7>HelloWorldData.cpp
6>HelloWorldDataSplDcps.cpp
7>HelloWorldDataSplDcps.cpp
7>Generating Code...
6>Generating Code...
7>HelloWorldData-cyclone.c
6>HelloWorldData-cyclone.c
7> Creating library C:/Users/king/Downloads/DDS_2017_Build/cyclonedds_cxx_ins_dir_2017/DDS_3_15/DDS_DLL_PROJECT_2017/Release/ddscxxHelloworldSubscriberDLL.lib and object C:/Users/king/Downloads/DDS_2017_Build/cyclonedds_cxx_ins_dir_2017/DDS_3_15/DDS_DLL_PROJECT_2017/Release/ddscxxHelloworldSubscriberDLL.exp
6> Creating library C:/Users/king/Downloads/DDS_2017_Build/cyclonedds_cxx_ins_dir_2017/DDS_3_15/DDS_DLL_PROJECT_2017/Release/ddscxxHelloworldPublisherDLL.lib and object C:/Users/king/Downloads/DDS_2017_Build/cyclonedds_cxx_ins_dir_2017/DDS_3_15/DDS_DLL_PROJECT_2017/Release/ddscxxHelloworldPublisherDLL.exp
7>ddscxxHelloworldSubscriberDLL.vcxproj -> C:\Users\king\Downloads\DDS_2017_Build\cyclonedds_cxx_ins_dir_2017\DDS_3_15\DDS_DLL_PROJECT_2017\Release\ddscxxHelloworldSubscriberDLL.dll
6>ddscxxHelloworldPublisherDLL.vcxproj -> C:\Users\king\Downloads\DDS_2017_Build\cyclonedds_cxx_ins_dir_2017\DDS_3_15\DDS_DLL_PROJECT_2017\Release\ddscxxHelloworldPublisherDLL.dll
8>------ Skipped Rebuild All: Project: ALL_BUILD, Configuration: Release x64 ------
8>Project not selected to build for this solution configuration
========== Rebuild All: 7 succeeded, 0 failed, 1 skipped ==========