Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++ - pragma problem
Hi, When i try to compile "Developer's Image Library" (http://www.imagelib.org) i get stuck on this define statements (and similar ones). Error message is "alignment must be a power of 2" and a warning "unrecognized pragma" #ifdef _WIN32 #pragma pack(push, bmp_struct, 1) #endif typedef struct BMPHEAD { ILushort bfType; ILint bfSize; ILuint bfReserved; ILint bfDataOff; ILint biSize; ILint biWidth; ILint biHeight; ILshort biPlanes; ILshort biBitCount; ILint biCompression; ILint biSizeImage; ILint biXPelsPerMeter; ILint biYPelsPerMeter; ILint biClrUsed; ILint biClrImportant; } IL_PACKSTRUCT BMPHEAD; typedef struct OS2_HEAD { // Bitmap file header. ILushort bfType; ILuint biSize; ILshort xHotspot; ILshort yHotspot; ILuint DataOff; // Bitmap info header. ILuint cbFix; ILuint cx; ILuint cy; ILushort cPlanes; ILushort cBitCount; /*ILuint ulCompression; ILuint cbImage; ILuint cxResolution; ILuint cyResolution; ILuint cclrUsed; ILuint cclrImportant; ILushort usUnits; ILushort usReserved; ILushort usRecording; ILushort usRendering; ILuint cSize1; ILuint cSize2; ILuint ulColorEncoding; ILuint ulIdentifier;*/ } IL_PACKSTRUCT OS2_HEAD; #ifdef _WIN32 #pragma pack(pop, bmp_struct) #endif /Mikael Jul 15 2002
<mikaelh delphi.se> wrote in message news:aguh0h$1n74$1 digitaldaemon.com...Hi, When i try to compile "Developer's Image Library" Jul 15 2002
What alignment are you setting it to? Jul 15 2002
<mikaelh delphi.se> wrote in message news:agutk0$25at$1 digitaldaemon.com...What alignment are you setting it to? Jul 15 2002
The #pragma pack is used to set the alignment within the source code. Your code passes it a macro or something, what value does that expand to? (The value needs to be a power of 2.) Jul 15 2002
On Mon, 15 Jul 2002 10:46:25 -0700, Walter wrote: [ #pragma pack(push, bmp_struct, 1) ]The #pragma pack is used to set the alignment within the source code. Your code passes it a macro or something, what value does that expand to? (The value needs to be a power of 2.) Jul 15 2002
"Christof Meerwald" <cmeerw web.de> wrote in message news:agv657$2drp$1 digitaldaemon.com...On Mon, 15 Jul 2002 10:46:25 -0700, Walter wrote: [ #pragma pack(push, bmp_struct, 1) ]The #pragma pack is used to set the alignment within the source code. Jul 15 2002
|