delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/01/23/01:34:21

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
Message-ID: <4010C061.80503@susiraja.net>
Date: Fri, 23 Jan 2004 08:34:09 +0200
From: Jani Tiainen <jani DOT tiainen AT susiraja DOT net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4
MIME-Version: 1.0
To: Cygwin List <cygwin AT cygwin DOT com>
Subject: Re: undefined symbols in dlls?
References: <Pine DOT LNX DOT 4 DOT 44 DOT 0401222216070 DOT 26257-100000 AT localhost DOT localdomain>
In-Reply-To: <Pine.LNX.4.44.0401222216070.26257-100000@localhost.localdomain>
X-IsSubscribed: yes

vikramshrowty AT yahoo DOT com wrote:

> Hi,
> 	Aren't dlls alowed to  have undefined symbols?
> --------------
> foo.c:
> 
> int bar();
> 
> int foo() {
>   return bar();
> }
> --------------
> 
> When I try to compile foo.c like this...
> gcc -shared -o foo.dll foo.c
> 
> I get an error message complaning that '_bar' is undefined.

Funny, this pops up again and again.. =)

Maybe this should be in FAQ (if it isn't already there).

Well answer is no. DLL's aren't allowed to have unbounded undefined 
symbols. There is few ways to get this over, see message thread "DLL and 
external symbols" started by me and "DLL vs. shared object linking 
behavior" started by Karl Robillard.

- Jani Tiainen

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019