From brian at inneroptic.com Tue Dec 3 14:09:35 2019 From: brian at inneroptic.com (Brian Heaney) Date: Wed Dec 4 05:34:49 2019 Subject: [xsd-users] Support for VS2015 / VS2017 Message-ID: Do you have plans for supporting pre-built CodeSynthesis libraries for Visual Studio 2015/2017? If not, we will need to build our own from source. ...Brian From boris at codesynthesis.com Wed Dec 4 08:39:29 2019 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed Dec 4 08:42:02 2019 Subject: [xsd-users] Support for VS2015 / VS2017 In-Reply-To: References: Message-ID: Brian Heaney writes: > Do you have plans for supporting pre-built CodeSynthesis libraries for > Visual Studio 2015/2017? If not, we will need to build our own from source. The XSD runtime library (libxsd) is header-only and doesn't require building. Are you referring to Xerces-C++? If so, the best way is to grab the latest version from the project's website and build it from source: https://xerces.apache.org/xerces-c/ From brian at inneroptic.com Thu Dec 5 11:43:44 2019 From: brian at inneroptic.com (Brian Heaney) Date: Fri Dec 6 05:20:38 2019 Subject: [xsd-users] Support for VS2015 / VS2017 In-Reply-To: References: Message-ID: Hi Boris, Thanks for the prompt reply. I have Xerces 3.2, built with VS2017. But I get many of the following link errors when I use CodeSynthesis. It seems that the .cxx/.hxx files that CodeSynthesis is generating are referencing xercesc_3_1, yet I configured Visual Studio to link against my xerces-c_3_2.lib file. Is there a way I can configure CodeSynthesis or Visual Studio to use Xerces 3.2? error LNK2019: unresolved external symbol "__declspec(dllimport) public: static void * __cdecl xercesc_3_1::XMemory::operator new(unsigned int)" (__imp_??2XMemory@xercesc_3_1@@SAPAXI@Z) referenced in function "public: virtual class xercesc_3_1::BinInputStream * __thiscall xsd::cxx::xml::sax::std_input_source::makeStream(void)const " (?makeStream@std_input_source@sax@xml@cxx@xsd @@UBEPAVBinInputStream@xercesc_3_1@@XZ) error LNK2019: unresolved external symbol "__declspec(dllimport) public: static void __cdecl xercesc_3_1::XMemory::operator delete(void *)" (__imp_??3XMemory@xercesc_3_1@@SAXPAX@Z) referenced in function "public: virtual void * __thiscall xsd::cxx::xml::dom::ostream_format_target::`scalar deleting destructor'(unsigned int)" (??_Gostream_format_target@dom@xml@cxx@xsd@ @UAEPAXI@Z) error LNK2019: unresolved external symbol "__declspec(dllimport) public: static void __cdecl xercesc_3_1::XMLPlatformUtils::Initialize(char const * const,char const * const,class xercesc_3_1::PanicHandler * const,class xercesc_3_1::MemoryManager * const)" (__imp_?Initialize@XMLPlatformUtils @xercesc_3_1@@SAXQBD0QAVPanicHandler@2@QAVMemoryManager@2@@Z) referenced in function "void __cdecl xsd::cxx::xml::initialize(void)" (?initialize@xml @cxx@xsd@@YAXXZ) Thanks, Brian On Wed, Dec 4, 2019 at 8:39 AM Boris Kolpackov wrote: > Brian Heaney writes: > > > Do you have plans for supporting pre-built CodeSynthesis libraries for > > Visual Studio 2015/2017? If not, we will need to build our own from > source. > > The XSD runtime library (libxsd) is header-only and doesn't require > building. Are you referring to Xerces-C++? If so, the best way is to > grab the latest version from the project's website and build it from > source: > > https://xerces.apache.org/xerces-c/ > -- *Brian Heaney, CEO* InnerOptic Technology, Inc 106A N. Churton Street Hillsborough, NC 27278 O: 919 732-2090 M: 919 450-7668 www.inneroptic.com From boris at codesynthesis.com Mon Dec 9 09:52:41 2019 From: boris at codesynthesis.com (Boris Kolpackov) Date: Mon Dec 9 09:55:29 2019 Subject: [xsd-users] Support for VS2015 / VS2017 In-Reply-To: References: Message-ID: Brian Heaney writes: > It seems that the .cxx/.hxx files that CodeSynthesis is generating are > referencing xercesc_3_1, yet I configured Visual Studio to link against my > xerces-c_3_2.lib file. [...] > > error LNK2019: unresolved external symbol "__declspec(dllimport) public: > static void * __cdecl xercesc_3_1::XMemory::operator new(unsigned int)" > (__imp_??2XMemory@xercesc_3_1@@SAPAXI@Z) referenced in function "public: > virtual class xercesc_3_1::BinInputStream * __thiscall > xsd::cxx::xml::sax::std_input_source::makeStream(void)const " > (?makeStream@std_input_source@sax@xml@cxx@xsd > @@UBEPAVBinInputStream@xercesc_3_1@@XZ) The generated code does not reference the versioned Xerces-C++ namespace directly. Which means you are either linking old object files that were compiled against the old headers (in which case a rebuild should help) or your Visual Studio or project setup picks up the old headers (see Include Directories in VC++ Directories for details). From brian at inneroptic.com Mon Dec 9 12:56:13 2019 From: brian at inneroptic.com (Brian Heaney) Date: Tue Dec 10 08:29:24 2019 Subject: [xsd-users] Support for VS2015 / VS2017 In-Reply-To: References: Message-ID: Boris, Problem fixed! Thanks for your tip. My Visual Studio project was still referencing the xerces include files provided by CodeSynthesis. I changed it to reference the xerces 3.2 include files. I turns out that XERCES_CPP_NAMESPACE is #defined in XercesVersion.hpp, which was tripping me up. Brian On Mon, Dec 9, 2019 at 9:52 AM Boris Kolpackov wrote: > Brian Heaney writes: > > > It seems that the .cxx/.hxx files that CodeSynthesis is generating are > > referencing xercesc_3_1, yet I configured Visual Studio to link against > my > > xerces-c_3_2.lib file. [...] > > > > error LNK2019: unresolved external symbol "__declspec(dllimport) public: > > static void * __cdecl xercesc_3_1::XMemory::operator new(unsigned int)" > > (__imp_??2XMemory@xercesc_3_1@@SAPAXI@Z) referenced in function "public: > > virtual class xercesc_3_1::BinInputStream * __thiscall > > xsd::cxx::xml::sax::std_input_source::makeStream(void)const " > > (?makeStream@std_input_source@sax@xml@cxx@xsd > > @@UBEPAVBinInputStream@xercesc_3_1@@XZ) > > The generated code does not reference the versioned Xerces-C++ namespace > directly. Which means you are either linking old object files that were > compiled against the old headers (in which case a rebuild should help) > or your Visual Studio or project setup picks up the old headers (see > Include Directories in VC++ Directories for details). > -- *Brian Heaney, CEO* InnerOptic Technology, Inc 106A N. Churton Street Hillsborough, NC 27278 O: 919 732-2090 M: 919 450-7668 www.inneroptic.com