From: Ozkan S. <se...@gm...> - 2010-02-15 11:10:23
|
On Mon, Feb 15, 2010 at 11:54 AM, Tommi Vainikainen <tva...@gm...> wrote: > Tommi Vainikainen <tva...@gm...> 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 |