www.delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
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: | Wed, 30 Jul 2003 17:38:45 -0700 (PDT) |
From: | vikramshrowty AT yahoo DOT com |
X-X-Sender: | vikram AT hidis DOT cjb DOT net |
Reply-To: | vikramshrowty AT fastmail DOT fm |
To: | cygwin AT cygwin DOT com |
Subject: | linking with non-cygwin dll |
Message-ID: | <Pine.LNX.4.50.0307301737210.22806-100000@hidis.cjb.net> |
MIME-Version: | 1.0 |
Hi, I had posted a query earlier about a cygwin program linking with a non-cygwin dll. Based on the very helpful responses and some googling around, I learnt that this is possible. But... heres a main.c that links with cygwin1.dll int main(void) { printf("CYGWIN\n"); test_dll(); return(0); } where test_dll is in a dll compiled with -mno-cygwin and is defined like this... __declspec(dllexport) __stdcall void test_dll(void) { printf("MSFT %d\n",i); fflush(stdout); } This works perfectly. But, notice the fflush. If this is removed, "MSFT" doesnt get printf'ed. I assuming that this is because the stdout buffer in the microsoft c-library isnt getting flushed automatically at program exit. Any ideas on why?? ..and how to remedy this?? --Vikram -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |