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: Thu, 24 Jul 2003 12:53:35 +0100 (BST) From: Elfyn McBratney X-X-Sender: elfyn AT localhost DOT localdomain Reply-To: cygwin AT cygwin DOT com To: cygwin AT cygwin DOT com Subject: Re: linking with non-cygwin dll In-Reply-To: <20030724114922.GA4296@linux_rln.harvest> Message-ID: Mail-Followup-To: cygwin AT cygwin DOT com MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Thu, 24 Jul 2003, Ronald Landheer-Cieslak wrote: > I've just tried the direct linking thing. My STC doesn't quite work as it > should, but at least it doesn't actually die either.. > > The STC is available here: > 6696e19e993e83606e205b5cbc2104fd *crosslink.tgz > http://blytkerchan.chez.tiscali.fr/crosslink.tgz > > it contains a makefile and two sources - compile and run. > You should get: > $ make > gcc -mno-cygwin -g -o dll.dll -shared dll.c > gcc -g -o test.exe test.c dll.dll > $ ./test > 12 > 13 > $ echo $? > 0 > > but I get: > $ make > gcc -mno-cygwin -g -o dll.dll -shared dll.c > gcc -g -o test.exe test.c dll.dll > $ ./test > 13 > $ echo $? > 0 > > so apparently the printf in the DLL doesn't work - I don't know why, though. > Perhaps someone else can figure that one out.. It's because there's two printf symbols (the MSVCRT one and the Cygwin one). Elfyn -- Elfyn McBratney, EMCB | http://www.nongnu.org/wwwauth/ http://www.emcb.co.uk | http://www.emcb.co.uk/webauth/ elfyn AT emcb DOT co DOT uk | wwwauth-users AT nongnu DOT org -- 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/