Hold on. Isn't that a function header? Those do not need semicolons...
Thoralf, please have a look at the following and reformat the assembler:
http://www-106.ibm.com/developerworks/library/l-ia.html
<http://www-106.ibm.com/developerworks/library/l-ia.html>
HTH,
Matt
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...]On Behalf Of Alfred P.
Reaud
Sent: Friday, June 24, 2005 9:24 AM
To: Dev-Cpp UserList
Subject: Re: [Dev-C++] inline assembly in winnt.h
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 <mailto:al...@ya...>
<http://www.geocities.com/alreaud/>
___________________________________________________________________
The information contained in this message and any attachment may be
proprietary, confidential, and privileged or subject to the work
product doctrine and thus protected from disclosure. If the reader
of this message is not the intended recipient, or an employee or
agent responsible for delivering this message to the intended
recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited.
If you have received this communication in error, please notify me
immediately by replying to this message and deleting it and all
copies and backups thereof. Thank you.
|