I am porting a code which runs perfectly on Linux to windows visual c++. I have this code in Linux:
struct exif_desc
{
uint16_t tag;
uint16_t type;
uint32_t length;
uint32_t value;
}
__attribute__((__packed__));
I am getting error on windows:
'__packed__' : undeclared identifier
I am wondering if I can fix this error by using
#pragma pack(1)
is there any difference between them? Is there any syntax that can be used in Linux and Windows for this attribute?
#pragma pack()
at the end of the struct. Question might be duplicate of #1538464 – Classicist