On Mon, Feb 15, 2010 at 11:54 AM, Tommi Vainikainen <[email protected]> wrote:
> 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.
>

Sorry for seeing this one late.

> 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.
>

One work aronund maybe doing an #undef __cpuid
before including intrin.h, or ..

> 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)
>

.. the solution suggested here seems good, too, and
is a better one.

> --
> Tommi Vainikainen

Glad that your issue is solved.

--
Ozkan

------------------------------------------------------------------------------
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