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 Message-ID: <4010C061.80503@susiraja.net> Date: Fri, 23 Jan 2004 08:34:09 +0200 From: Jani Tiainen 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 Subject: Re: undefined symbols in dlls? References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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/