Tommi Vainikainen <[email protected]> writes:
> I was trying to cross-compile Xerces-C++ 3.1 on Debian to 64 bit
> Windows. However this triggered compilation error with cpuid macro.
>
> error: macro "__cpuid" requires 5 arguments, but only 2 given
>
> MSDN's prototype for __cpuid is "void __cpuid(int CPUInfo[4], int InfoType)",
> which is also what I found from w64's intrin.h

I'm replying to myself now I resolved the problem.

The problem lies in the fact that Xerces-C++ configure checks for
existence of cpuid.h (provided by GCC) and intrin.h (provided by
mingw-w64). When those headers are included, they provide conflicting
definition of __cpuid.

So, one should not include both cpuid.h and intrin.h, but instead select
which API to use.

(Xerces-C++ reported on http://issues.apache.org/jira/browse/XERCESC-1912)

-- 
Tommi Vainikainen

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to