Re: [Dev-C++] inline assembly in winnt.h
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Alfred P. R. <al...@ya...> - 2005-06-24 16:23:57
|
Hi Thoralf,
Possibly a missing semi-colon?
Try:
DWORD ShiftCount
);
Instead of
DWORD ShiftCount
)
I'm basing that on the first error, and the complaints of missing ";". Possibly a problem with the formatting of Int64ShllMod32 parameters?
Thoralf Schulze <tho...@ya...> wrote:
Hi there,
I hope this is the right place to ask this question -
I've been searching both the archive and the web, to
no avail ...
I'm just trying to compile a project (GEM for Pure
Data, CVS version, see
http://gem.iem.at/download.html#CVS) that involves
some DirectShow stuff. Of course, a bunch of M$
libraries is needed for this, and Dev-C++ (or, for
that matter, MinGW or g++) chokes on some inline
assembly in winnt.h (lines 588 ff.), which is part of
the MS Platform SDK.
Here's the relevant code:
#if _MSC_VER >= 1200
#pragma warning(push)
#endif
#pragma warning(disable:4035 4793) //
re-enable below
__inline ULONGLONG
NTAPI
Int64ShllMod32 (
ULONGLONG Value,
DWORD ShiftCount
)
{
__asm {
mov ecx, ShiftCount
mov eax, dword ptr [Value]
mov edx, dword ptr [Value+4]
shld edx, eax, cl
shl eax, cl
}
}
and the error messages:
<snip>
D:/Programme/Microsoft Platform SDK/Include/winnt.h:588: error: expected `(' before
'{' token
D:/Programme/Microsoft Platform SDK/Include/winnt.h:588: error: expected asm body before '{' token
D:/Programme/Microsoft Platform SDK/Include/winnt.h:589: error: `mov' undeclared
(first use this function)
D:/Programme/Microsoft Platform SDK/Include/winnt.h:589: error: (Each undeclared
identifier is reported only once for each function it appears in.)
D:/Programme/Microsoft Platform SDK/Include/winnt.h:589: error: expected `;' before
"ecx"
<snip>
Alfred P. Reaud
|