title: C migrating to C++ (embedded)
body: <p>I have a project in pure C - st usb library and I need to migrate it to c++ and change same structures into classes. I removed all c++ "protections" like:</p>
  
  <pre><code>#ifdef __cplusplus
  extern "C" {
  #endif
  
  #ifdef __cplusplus
  }
  #endif
  </code></pre>
  
  <p>I changed all files extensions from <code>.c</code> to <code>.cpp</code> (except HAL library).
  I realized that c++ <code>.hex</code> is 7kB smaller then c <code>.hex</code>. When I looked into <code>.map</code> file I saw that many functions are missing. I thought that <code>static</code>functions caused that, but removing <code>static</code> key word didn't help. Does anyone have idea what could cause that some functions weren't compiled. When extensions are <code>.c</code> everything is fine.</p>