Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: From: Ben Miller To: "'cygwin AT cygwin DOT com'" Subject: Leading underscore in export names. Date: Fri, 9 Mar 2001 12:05:00 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Hi, I have a function declared like this: extern "C" __declspec(dllexport) void __stdcall foo() { } When I build this into a DLL using the Visual C++ compiler (cl.exe), the exported name is: _foo AT 0 but when I build it using the GNU C++ compiler (g++), the exported name is: foo AT 0 Which one is correct? I have read that the stdcall convention should prepend an underscore to exported names - should the extern "C" qualifier remove it? Regards, Ben. Mercia Software Ltd. Mercia House Ashted Lock Aston Science Park Birmingham B7 4AZ, UK Registered Number: 1868855 (Cardiff) Tel: 44 (0)121 359 5096 Fax: 44 (0)121 359 0375 Web Site: http://www.mercia.com -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple