Mein Code verwendet, um in der Vergangenheit zu arbeiten, aber jetzt ist die Strukturgröße plötzlich 16 Bytes. Es war einmal 13 Bytes. Ich habe kürzlich von Xcode 4.2 auf Xcode 4.3.1 (4E1019) aufgerüstet.pragma pack (1) noch __attribute__ ((aligned (1))) funktioniert
#pragma pack(1)
struct ChunkStruct {
uint32_t width;
uint32_t height;
uint8_t bit_depth;
uint8_t color_type;
uint8_t compression;
uint8_t filter;
uint8_t interlace;
};
#pragma pack()
STATIC_ASSERT(expected_13bytes, sizeof(struct ChunkStruct) == 13);
habe ich versucht, unsuccesfully
#pragma pack(push, 1)
/* struct ChunkStruct { ... }; */
#pragma pack(pop)
mit Ich habe auch die folgende versucht, aber kein Glück
struct ChunkStruct {
uint32_t width;
uint32_t height;
uint8_t bit_depth;
uint8_t color_type;
uint8_t compression;
uint8_t filter;
uint8_t interlace;
} __attribute__ ((aligned (1)));
Wie structs mit Xcode 4.3.1 zu packen?