title: what is the difference between __attribute__((__packed__)); and #pragma pack(1)
body: <p>I am porting a code which runs perfectly on Linux to windows visual c++.
  I have this code in Linux:</p>
  
  <pre><code>struct exif_desc
  {
      uint16_t  tag;
      uint16_t  type;
      uint32_t  length;
      uint32_t  value;
  }
  __attribute__((__packed__));
  </code></pre>
  
  <p>I am getting error on windows:</p>
  
  <pre><code>'__packed__' : undeclared identifier 
  </code></pre>
  
  <p>I am wondering if I can fix this error by using </p>
  
  <pre><code>#pragma pack(1)
  </code></pre>
  
  <p>is there any difference between them? Is there any syntax that can be used in Linux and Windows for this attribute?</p>