You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by "Day, Julian" <jc...@mail.usask.ca> on 2018/06/10 15:47:16 UTC

Problems building latest Xerces with Win10 and MSVC

Hi,

First off, I wanted to say thank you for all the hard work that's been put into Xerces-C++ over the years.  I've been using it as a developer since 2006, both professionally and personally.

At the moment, I'm trying to update my build environment to use the latest release in my roguelike game.  I'm currently using Xerces-C++ 3.1.1.  I believe I downloaded a binary distribution for this, but since these aren't available for the more recent releases, I'm trying to build it myself.

I downloaded the sources for 3.2.1, and unzipped them.  I then went to the "Build Instructions" page.  In a Visual Studio administrator command prompt, I navigated to the unzipped sources, and ran "cmake .".

I've uploaded this to:

https://pastebin.com/D5K8K3Cg

Then, in the same directory and in the same VS admin command prompt, I ran "cmake --build .".  Once this finished, I had about two dozen linker errors.  I've saved the output to:

https://pastebin.com/n9BM9dmS

I'm using Visual Studio 2017 and cmake 3.11.3 on Windows 10.  Are there any steps I've missed?  I've tried to follow the provided instructions.  Any ideas or suggestions would be greatly appreciated.

Thanks,
Julian

Re: Problems building latest Xerces with Win10 and MSVC

Posted by DK <dk...@gmail.com>.
Hi,

My dad passed away last year please remove him from this thread.

Thank you

On 11 June 2018 at 04:40, Day, Julian <jc...@mail.usask.ca> wrote:

> Just a quick note: this seems to solve the issue.  I uninstalled Anaconda
> (not using it at the moment), installed v61.1 of ICU-C, and I was able to
> compile and link xerces 3.2.1 without any errors.
>
> Thanks,
> Julian
>
> ________________________________________
> From: Day, Julian
> Sent: June 10, 2018 1:33:16 PM
> To: c-users@xerces.apache.org
> Subject: Re: Problems building latest Xerces with Win10 and MSVC
>
> Hi Roger,
>
> It seems as if the version of ICU I have is part of my Anaconda
> installation.
>
> I'll get a newer version and try the process from the beginning.
>
> Thanks,
> Julian
> ________________________________________
> From: Roger Leigh <rl...@codelibre.net>
> Sent: June 10, 2018 1:05 PM
> To: c-users@xerces.apache.org
> Subject: Re: Problems building latest Xerces with Win10 and MSVC
>
> On 10/06/2018 16:56, Roger Leigh wrote:
>
> > Firstly, I think you have found a bug with a combination of
> > configuration options we haven't explicitly tested with VS2017, namely:
> >
> > - icu
> > - char16_t as XMLCh
> >
> > ICU is expecting wchar_t, and we need to explicitly reinterpret_cast
> > from e.g. const char16_t * to const wchar_t *.
> >
> > I thought we had already fixed all these cases, but there are so many
> > different ways you can configure Xerces-C++, it's quite possible I've
> > missed this particular combination.
>
> Actually, just to follow up, new versions of ICU switched to char16_t a
> few releases back.  I think if you used a newer version of ICU, you
> would find this would work seamlessly.
>
> However, we probably want to add appropriate casts to the ICU type so
> that it works with all ICU versions.
>
>
> Regards,
> Roger
>
>
>

Re: Problems building latest Xerces with Win10 and MSVC

Posted by "Day, Julian" <jc...@mail.usask.ca>.
Just a quick note: this seems to solve the issue.  I uninstalled Anaconda (not using it at the moment), installed v61.1 of ICU-C, and I was able to compile and link xerces 3.2.1 without any errors.

Thanks,
Julian

________________________________________
From: Day, Julian
Sent: June 10, 2018 1:33:16 PM
To: c-users@xerces.apache.org
Subject: Re: Problems building latest Xerces with Win10 and MSVC

Hi Roger,

It seems as if the version of ICU I have is part of my Anaconda installation.

I'll get a newer version and try the process from the beginning.

Thanks,
Julian
________________________________________
From: Roger Leigh <rl...@codelibre.net>
Sent: June 10, 2018 1:05 PM
To: c-users@xerces.apache.org
Subject: Re: Problems building latest Xerces with Win10 and MSVC

On 10/06/2018 16:56, Roger Leigh wrote:

> Firstly, I think you have found a bug with a combination of
> configuration options we haven't explicitly tested with VS2017, namely:
>
> - icu
> - char16_t as XMLCh
>
> ICU is expecting wchar_t, and we need to explicitly reinterpret_cast
> from e.g. const char16_t * to const wchar_t *.
>
> I thought we had already fixed all these cases, but there are so many
> different ways you can configure Xerces-C++, it's quite possible I've
> missed this particular combination.

Actually, just to follow up, new versions of ICU switched to char16_t a
few releases back.  I think if you used a newer version of ICU, you
would find this would work seamlessly.

However, we probably want to add appropriate casts to the ICU type so
that it works with all ICU versions.


Regards,
Roger



Re: Problems building latest Xerces with Win10 and MSVC

Posted by "Day, Julian" <jc...@mail.usask.ca>.
Hi Roger,

It seems as if the version of ICU I have is part of my Anaconda installation.

I'll get a newer version and try the process from the beginning.

Thanks,
Julian
________________________________________
From: Roger Leigh <rl...@codelibre.net>
Sent: June 10, 2018 1:05 PM
To: c-users@xerces.apache.org
Subject: Re: Problems building latest Xerces with Win10 and MSVC

On 10/06/2018 16:56, Roger Leigh wrote:

> Firstly, I think you have found a bug with a combination of
> configuration options we haven't explicitly tested with VS2017, namely:
>
> - icu
> - char16_t as XMLCh
>
> ICU is expecting wchar_t, and we need to explicitly reinterpret_cast
> from e.g. const char16_t * to const wchar_t *.
>
> I thought we had already fixed all these cases, but there are so many
> different ways you can configure Xerces-C++, it's quite possible I've
> missed this particular combination.

Actually, just to follow up, new versions of ICU switched to char16_t a
few releases back.  I think if you used a newer version of ICU, you
would find this would work seamlessly.

However, we probably want to add appropriate casts to the ICU type so
that it works with all ICU versions.


Regards,
Roger



Re: Problems building latest Xerces with Win10 and MSVC

Posted by Roger Leigh <rl...@codelibre.net>.
On 10/06/2018 16:56, Roger Leigh wrote:

> Firstly, I think you have found a bug with a combination of 
> configuration options we haven't explicitly tested with VS2017, namely:
> 
> - icu
> - char16_t as XMLCh
> 
> ICU is expecting wchar_t, and we need to explicitly reinterpret_cast 
> from e.g. const char16_t * to const wchar_t *.
> 
> I thought we had already fixed all these cases, but there are so many 
> different ways you can configure Xerces-C++, it's quite possible I've 
> missed this particular combination.

Actually, just to follow up, new versions of ICU switched to char16_t a 
few releases back.  I think if you used a newer version of ICU, you 
would find this would work seamlessly.

However, we probably want to add appropriate casts to the ICU type so 
that it works with all ICU versions.


Regards,
Roger



Re: Problems building latest Xerces with Win10 and MSVC

Posted by Roger Leigh <rl...@codelibre.net>.
On 10/06/2018 15:47, Day, Julian wrote:
> Hi,
> 
> First off, I wanted to say thank you for all the hard work that's been put into Xerces-C++ over the years.  I've been using it as a developer since 2006, both professionally and personally.
> 
> At the moment, I'm trying to update my build environment to use the latest release in my roguelike game.  I'm currently using Xerces-C++ 3.1.1.  I believe I downloaded a binary distribution for this, but since these aren't available for the more recent releases, I'm trying to build it myself.
> 
> I downloaded the sources for 3.2.1, and unzipped them.  I then went to the "Build Instructions" page.  In a Visual Studio administrator command prompt, I navigated to the unzipped sources, and ran "cmake .".
> 
> I've uploaded this to:
> 
> https://pastebin.com/D5K8K3Cg
> 
> Then, in the same directory and in the same VS admin command prompt, I ran "cmake --build .".  Once this finished, I had about two dozen linker errors.  I've saved the output to:
> 
> https://pastebin.com/n9BM9dmS
> 
> I'm using Visual Studio 2017 and cmake 3.11.3 on Windows 10.  Are there any steps I've missed?  I've tried to follow the provided instructions.  Any ideas or suggestions would be greatly appreciated.

Dear Julian,

Firstly, I think you have found a bug with a combination of 
configuration options we haven't explicitly tested with VS2017, namely:

- icu
- char16_t as XMLCh

ICU is expecting wchar_t, and we need to explicitly reinterpret_cast 
from e.g. const char16_t * to const wchar_t *.

I thought we had already fixed all these cases, but there are so many 
different ways you can configure Xerces-C++, it's quite possible I've 
missed this particular combination.

Secondly, this error:
   library machine type 'x64' conflicts with target machine type 'x86'
indicates that you are mixing 64- and 32-bit libraries, which isn't 
allowed.  The first thing that jumps out is the use of Anaconda for ICU. 
  Is that the wrong bitness?  Did you build from the correct Visual 
Studio command prompt e.g. x64 native?  Of you build from a regular 
command prompt, you can use -G "Visual Studio 15 2017 [Win64]" to 
explicitly specify 32-bit without the Win64 suffix, or 64-bit with the 
Win64 suffix.

I can check out the first issue during the week, and provide any fix 
required there.  For the second, you'll need to double-check how you're 
building and which libraries are which bitness.


Regards,
Roger