From ajay.auti at siemens.com Mon Jul 8 02:35:50 2024 From: ajay.auti at siemens.com (Auti, Ajay) Date: Tue Jul 9 06:01:07 2024 Subject: [xsd-users] Errors: Redefination:Different Basic Type e.g - 'xml_schema::uri': redefinition; different basic types Message-ID: Hi boris, For my application(Windows basesd-MFC), I am using the Code Synthesis Library. I encountered a lot of errors which highlighted below. 1. Library 1 * I have to enable Wide character (wchar_t) support for one.xsd file in one library. When creating.hxx files, we are initially using standard character support. * Our command for file generation is as follows: xsd cxx-tree --namespace-map http://www.w3.org/2000/09/xmldsig#=xmldsig --generate-serialization --proprietary-license --char-type wchar_t --char-encoding auto ..\CCIA\Schema\WTCCIA_conf.xsd 1. Library 2 * My other library continues to use other.xsd files with Normal Char Support. * Our command for file generation is as follows: xsd cxx-tree --location-map http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd=xmldsig-core-schema.xsd --namespace-map http://www.w3.org/2000/09/xmldsig#=xmldsig_xsd --generate-serialization --proprietary-license schema\*.xsd * Library 2 and Library 1 are statically connected. I encountered a lot of errors with "redefinition; different basic types" when compiling my code. Errors: 'xml_schema::uri': redefinition; different basic types 'xml_schema::uri': redefinition; different basic types 'xml_schema::uri': redefinition; different basic types 'xml_schema::uri': redefinition; different basic types 'xml_schema::uri': redefinition; different basic types 'xml_schema::unexpected_enumerator': redefinition; different basic types 'xml_schema::unexpected_enumerator': redefinition; different basic types 'xml_schema::unexpected_enumerator': redefinition; different basic types 'xml_schema::unexpected_enumerator': redefinition; different basic types 'xml_schema::unexpected_enumerator': redefinition; different basic types 'xml_schema::unexpected_element': redefinition; different basic types 'xml_schema::unexpected_element': redefinition; different basic types 'xml_schema::unexpected_element': redefinition; different basic types 'xml_schema::unexpected_element': redefinition; different basic types 'xml_schema::unexpected_element': redefinition; different basic types 'xml_schema::token': redefinition; different basic types 'xml_schema::token': redefinition; different basic types 'xml_schema::token': redefinition; different basic types 'xml_schema::token': redefinition; different basic types 'xml_schema::token': redefinition; different basic types 'xml_schema::token': redefinition; different basic types 'xml_schema::token': redefinition; different basic types 'xml_schema::time': redefinition; different basic types 'xml_schema::time': redefinition; different basic types 'xml_schema::time': redefinition; different basic types 'xml_schema::time': redefinition; different basic types 'xml_schema::time': redefinition; different basic types Would you kindly assist me in solving this problem? Regards, Ajay From ajay.auti at siemens.com Thu Jul 11 00:43:10 2024 From: ajay.auti at siemens.com (Auti, Ajay) Date: Thu Jul 11 11:24:57 2024 Subject: [xsd-users] RE: Errors: Redefination:Different Basic Type e.g - 'xml_schema::uri' Message-ID: Hi Team, For my application(Windows basesd-MFC), I am using the Code Synthesis Library. I encountered a lot of errors which highlighted below. 1. Library 1 * I have to enable Wide character (wchar_t) support for one.xsd file in one library. When creating.hxx files, we are initially using standard character support. * Our command for file generation is as follows: xsd cxx-tree --namespace-map http://www.w3.org/2000/09/xmldsig#=xmldsig --generate-serialization --proprietary-license --char-type wchar_t --char-encoding auto ..\CCIA\Schema\WTCCIA_conf.xsd 1. Library 2 * My other library continues to use other.xsd files with Normal Char Support. * Our command for file generation is as follows: xsd cxx-tree --location-map http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd=xmldsig-core-schema.xsd --namespace-map http://www.w3.org/2000/09/xmldsig#=xmldsig_xsd --generate-serialization --proprietary-license schema\*.xsd * Library 2 and Library 1 are statically connected. I encountered a lot of errors with "redefinition; different basic types" when compiling my code. Errors: 'xml_schema::uri': redefinition; different basic types 'xml_schema::uri': redefinition; different basic types 'xml_schema::uri': redefinition; different basic types 'xml_schema::uri': redefinition; different basic types 'xml_schema::uri': redefinition; different basic types 'xml_schema::unexpected_enumerator': redefinition; different basic types 'xml_schema::unexpected_enumerator': redefinition; different basic types 'xml_schema::unexpected_enumerator': redefinition; different basic types 'xml_schema::unexpected_enumerator': redefinition; different basic types 'xml_schema::unexpected_enumerator': redefinition; different basic types 'xml_schema::unexpected_element': redefinition; different basic types 'xml_schema::unexpected_element': redefinition; different basic types 'xml_schema::unexpected_element': redefinition; different basic types 'xml_schema::unexpected_element': redefinition; different basic types 'xml_schema::unexpected_element': redefinition; different basic types 'xml_schema::token': redefinition; different basic types 'xml_schema::token': redefinition; different basic types 'xml_schema::token': redefinition; different basic types 'xml_schema::token': redefinition; different basic types 'xml_schema::token': redefinition; different basic types 'xml_schema::token': redefinition; different basic types 'xml_schema::token': redefinition; different basic types 'xml_schema::time': redefinition; different basic types 'xml_schema::time': redefinition; different basic types 'xml_schema::time': redefinition; different basic types 'xml_schema::time': redefinition; different basic types 'xml_schema::time': redefinition; different basic types Would you kindly assist me in solving this problem? Regards, Ajay From boris at codesynthesis.com Thu Jul 11 11:42:30 2024 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu Jul 11 11:42:40 2024 Subject: [xsd-users] RE: Errors: Redefination:Different Basic Type e.g - 'xml_schema::uri' In-Reply-To: References: Message-ID: Auti, Ajay writes: > * I have to enable Wide character (wchar_t) support for one.xsd > file in one library. When creating.hxx files, we are initially using standard character support. > > * My other library continues to use other.xsd files with Normal Char > Support. > > * Library 2 and Library 1 are statically connected. This is not officially supported: you should use the same character type across your application, including all the libraries linked (statically or dynamically). You could try to make this work my mapping the XML Schema namespace to two different C++ namespaces (using the --namespace-map XSD compiler option) but there is no guarantee it will work and I would not recommend it unless you really cannot use the same character type in both cases. From dave_blackham at keysight.com Mon Jul 22 20:33:20 2024 From: dave_blackham at keysight.com (Dave Blackham) Date: Mon Jul 22 20:33:43 2024 Subject: [xsd-users] Version mismatch error Message-ID: I needed to add additional nodes to the *.xsd file that I created in 2014/15 timeframe. At the time, I saved a copy of the xsd.exe file for later use. When I made the changes to the *.xsd file In ended up with compile errors because the versions didn't match. In both the *.hxx and *-fwd.hxx files I have multiple C1189 errors due to the mismatch with version.hxx file #if (XSD_INT_VERSION != 4009910L) #error XSD runtime version mismatch #endif In version.hxx #define XSD_INT_VERSION 4000000L Hxx It has been a while, so I am a bit rusty on the process used previously. I simply tried to use the xsd.exe on the updated *.xsd file then copied the resulting *.cxx and *.hxx files into the Visual Studio 2010 project. Am I missing a step that I should be taking? Thanks for your assistance. Dave From boris at codesynthesis.com Tue Jul 23 00:42:35 2024 From: boris at codesynthesis.com (Boris Kolpackov) Date: Tue Jul 23 04:43:32 2024 Subject: [xsd-users] Version mismatch error In-Reply-To: References: Message-ID: Dave Blackham writes: > #if (XSD_INT_VERSION != 4009910L) > #error XSD runtime version mismatch > #endif > > In version.hxx > #define XSD_INT_VERSION 4000000L You XSD compiler appears to be from the 4.1.0.a10 pre-release while your libxsd runtime library is from 4.0.0. You will need to change one or the other to match. You can find the 4.1.0.a10 archive (which includes both the xsd compiler and the libxsd runtime) here: https://codesynthesis.com/~boris/tmp/xsd/ You can find the 4.0.0 release archives here: https://codesynthesis.com/products/xsd/download-4.0.xhtml Another and likely better, alternative is to upgrade to the latest release, which is 4.2.0: https://codesynthesis.com/products/xsd/download.xhtml From dave_blackham at keysight.com Tue Jul 23 11:37:03 2024 From: dave_blackham at keysight.com (Dave Blackham) Date: Tue Jul 23 11:37:48 2024 Subject: [xsd-users] Version mismatch error In-Reply-To: References: Message-ID: Boris, Thanks for the help. I need to create both a 32 bit version and a 64 bit version of the *.dll I?m making. I looked at the 4.2.0 for a bit and it isn?t clear to me if this will support making both a 32 bit and 64 bit *.dll. Best regards, Dave From: Boris Kolpackov Sent: Monday, July 22, 2024 9:43 PM To: Dave Blackham Cc: xsd-users@codesynthesis.com Subject: Re: [xsd-users] Version mismatch error Dave Blackham writes: > #if (XSD_INT_VERSION != 4009910L) > #error XSD runtime version mismatch > #endif > > In version.?hxx > #define XSD_INT_VERSION 4000000L You XSD compiler appears to be ZjQcmQRYFpfptBannerStart This Message is From an External Sender: Use caution opening files, clicking links or responding to requests. ZjQcmQRYFpfptBannerEnd Dave Blackham > writes: > #if (XSD_INT_VERSION != 4009910L) > #error XSD runtime version mismatch > #endif > > In version.hxx > #define XSD_INT_VERSION 4000000L You XSD compiler appears to be from the 4.1.0.a10 pre-release while your libxsd runtime library is from 4.0.0. You will need to change one or the other to match. You can find the 4.1.0.a10 archive (which includes both the xsd compiler and the libxsd runtime) here: https://urldefense.com/v3/__https://codesynthesis.com/*boris/tmp/xsd/__;fg!!I5pVk4LIGAfnvw!h7eWknd0kFLx-HD1fI9UgftuYQIA2vRm28qJdHHqaz26bVsQ4CH65h4BX2VxuDyd1Uqvx_ctB9DfUVU05au91VKuVA$ You can find the 4.0.0 release archives here: https://urldefense.com/v3/__https://codesynthesis.com/products/xsd/download-4.0.xhtml__;!!I5pVk4LIGAfnvw!h7eWknd0kFLx-HD1fI9UgftuYQIA2vRm28qJdHHqaz26bVsQ4CH65h4BX2VxuDyd1Uqvx_ctB9DfUVU05av_qHbonA$ Another and likely better, alternative is to upgrade to the latest release, which is 4.2.0: https://urldefense.com/v3/__https://codesynthesis.com/products/xsd/download.xhtml__;!!I5pVk4LIGAfnvw!h7eWknd0kFLx-HD1fI9UgftuYQIA2vRm28qJdHHqaz26bVsQ4CH65h4BX2VxuDyd1Uqvx_ctB9DfUVU05asvHnp00g$ From boris at codesynthesis.com Tue Jul 23 11:43:22 2024 From: boris at codesynthesis.com (Boris Kolpackov) Date: Tue Jul 23 11:43:32 2024 Subject: [xsd-users] Version mismatch error In-Reply-To: References: Message-ID: Dave Blackham writes: > I need to create both a 32 bit version and a 64 bit version of the *.dll > I?m making. I looked at the 4.2.0 for a bit and it isn?t clear to me if > this will support making both a 32 bit and 64 bit *.dll. We haven't removed 32-bit support (nor have any immediate plans for doing so) though we don't test it much these days. The XSD compiler (xsd.exe on Windows) that we ship is 64-bit but you should be able to compile the code it generates for both 32 and 64-bit targets without any problems.