Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Mon, 24 Mar 2003 18:43:21 +0800 (GMT-8) From: Sim Joon To: cygwin AT cygwin DOT com Subject: Linking VC++ DLL Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Hi, I have already compiled and linked the following function extern "C" __declspec(dllexport) int hello() { printf("Hello World!\n"); return 345; } in a VC++ DLL. I have also successfully linked and created the import library in Cygwin, libhallo.a However, when I compile and run the following code using gcc hello.c -lhallo extern int hello(); int main() { printf("What is this? %d\n", hello()); } All I get in return is (under Cygwin): What is this? 345 345 demonstrates that the function was called and correctly returned but why is it that the printf statement in the function hello() went missing? I have tried to run other VC compiled program but had no problem in getting printf statements to work under the Cygwin environment. Would appreciate if anyone can suggest what could be the possible problem. Thanks! regards Edward -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/