Closed HarryDC closed 5 years ago
I've heard about issues before when trying to combine debug- and release-builds of applications- i.c.w. DDS(-library) code .. could that be an issue here too (i.e. are you sure you're not combining a release-built application with a debug-built dds-library and vice-versa) ?
When using a debug application with a release build of opensplice you also have to set the NDEBUG preprocessor flag in visual studio.
@hansvanthag @ThijsSassen, This is using Opensplice built with release but the customlibs built as debug (this method was documented somewhere in the OSPL docs) i.e. here are the dds libraries that I am linking with
D:\tools\dds\9-6-190227-virtualbox\HDE\x86.win32\lib\ddskernel.lib
D:\tools\dds\9-6-190227-virtualbox\HDE\x86.win32\lib\dcpsisocpp2d.lib
D:\tools\dds\9-6-190227-virtualbox\HDE\x86.win32\lib\dcpssacppd.lib
If it makes a difference I can also build all of DDS under debug, but then the documentation should be updated as well.
@HarryDC When using the debug lib of isocpp2 you need to have set the following flags in visual studio: C/C++ -> Preprocessor -> Add _DEBUG (as well as leaving NDEBUG set) C/C++ -> Code Generation -> set Multi-threaded Debug DLL (/MDd) instead of Multi Threaded DLL (/MD) see also https://istkb.adlinktech.com/article/compiling-isoc2-applications/
@ThijsSassen I missed setting NDEBUG in my own project, thanks (under 64bit builds this does seem to be necessary), that has done the trick. Thanks
This is the 190227 version of OSPL built using visual studio 17, win32. In the debug build of the win32 version there is an access violation when trying to create a reader..
This happens even when the reader is created all with default values, the location looks like its the copy constructor of the
ShareDelegate
, trigger from line 604 in thecommon_constructor
inTDataReaderImpl.hpp
, the stack trace is as follows:The release build seeming works fine, passing all our tests. Oddly the win-64 build works fine in release as well as with the debug libraries. Is there anyway I can work around this ? Or fix it ?