title: Can't prevent name mangling
body: <p>I am trying to build a dll written in C and which will be imported by other programs also written in C.</p>
  
  <p>So all the function that the dll is exporting are defined in a .dll <strong>"without __declspec(dllexport)"</strong> (intentional). I have defined a .def file with just an Export section and name of the functions I want to export (unmangled names).</p>
  
  <p>I am using vc71/vs2003 to build this and I am still getting mangled names (which I can see if I open the .lib in notepad). Also just for clarification, visual studio causes name mangling in C code as well (most resources I could find mentioned it being an issue with only C++).</p>
  
  <p>How can I prevent this name mangling?</p>
  
  <p>Further Information:</p>
  
  <p>The mangled names are of the form 'functionName@integer' where integer represent the parameter size in bytes (and not ordinal). For example,</p>
  
  <p><strong>From .lib:</strong>
  _PrepareSeverResponse@8</p>
  
  <p><strong>Function declaration in .h:</strong>
  char* PrepareSeverResponse(unsigned int* size ,handshake* ws_handshake);</p>
  
  <p><strong>.def:</strong>
  EXPORTS
      PrepareSeverResponse</p>
  
  <p><strong>Calling Convention:</strong> __stdcall(/Gz)</p>
  
  <p>Hope this makes it clearer.</p>