[Dev-C++] inline assembly in winnt.h
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Thoralf S. <tho...@ya...> - 2005-06-24 09:03:06
|
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: make.exe -f "D:\Dokumente und Einstellungen\VJ\Eigene Dateien\GEM\Gem\src\Makefile.win" all g++.exe -c Pixes/DSgrabber.cpp -o Pixes/DSgrabber.o -I"." -I"./Base" -I"../../pd/src" -I"../../GemLibs/freetype2/include" -I"../../GemLibs/tiff/libtiff" -I"../../GemLibs/JPEG" -I"../../GemLibs/wintab/include" -I"../../GemLibs/FTGL/include" -I"D:/Programme/Microsoft Platform SDK/Samples/Multimedia/DirectShow/BaseClasses" -I"D:/Programme/Microsoft DirectX 9.0 SDK (February 2005)/Include" -I"D:/Programme/Microsoft Platform SDK/Include" -D__GNUWIN32__ -mcpu=pentiumpro -D_M_IX86=600 -W -finline-functions -DNDEBUG -DWIN32 -D_WINDOWS -DNT -D_LANGUAGE_C_PLUS_PLUS -DWIN32_LEAN_AND_MEAN -DGEM_INTERNAL -O2 -march=i686 -msse In file included from D:/Programme/Microsoft Platform SDK/Include/windef.h:176, from d:/programme/Dev-Cpp/Bin/../lib/gcc/mingw32/3.4.2/../../../../include/excpt.h:20, from D:/Programme/Microsoft Platform SDK/Include/windows.h:157, from D:/Programme/Microsoft Platform SDK/Samples/Multimedia/DirectShow/BaseClasses/streams.h:41, from Pixes/DSgrabber.cpp:13: D:/Programme/Microsoft Platform SDK/Include/winnt.h: In function `ULONGLONG Int64ShllMod32(ULONGLONG, DWORD)': 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" D:/Programme/Microsoft Platform SDK/Include/winnt.h: In function `LONGLONG Int64ShraMod32(LONGLONG, DWORD)': D:/Programme/Microsoft Platform SDK/Include/winnt.h:604: error: expected `(' before '{' token D:/Programme/Microsoft Platform SDK/Include/winnt.h:604: error: expected asm body before '{' token D:/Programme/Microsoft Platform SDK/Include/winnt.h:605: error: `mov' undeclared (first use this function) D:/Programme/Microsoft Platform SDK/Include/winnt.h:605: error: expected `;' before "ecx" It would be really great if someone could shed some light on this ... many thanks in advance, Thoralf. ___________________________________________________________ Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com |