X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org X-Spam-Score: -75.792 Message-ID: <4A71DBC8.4070807@sh.cvut.cz> Date: Thu, 30 Jul 2009 19:43:36 +0200 From: =?UTF-8?B?VsOhY2xhdiBIYWlzbWFu?= User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Creation of a shared module (gcc -shared) , undefined references References: <4A71A396 DOT 8060300 AT bull DOT net> In-Reply-To: <4A71A396.8060300@bull.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Martine Carannante wrote, On 30.7.2009 15:43: > Hi > > I try to port on CYGWIN an open source which runs correctly on Linux. > In this open source, a shared module (linked with option -shared) is > created and after it's loaded by the main program with lt_dlopen() > function. > > On CYGWIN, I have a problem when I create the module (gcc option > -shared). I have always some undefined references to functions which > belongs to the main program. On Linux it's not a problem, there are no > errors. > I try to add the option -Wl,-allow-shlib-undefined. I have always the > problem. > > I don't know what to do. Are there other options to add to the gcc > command ?I tried several..or do I have to modify the source code of the > module? > I'm not very familiar with shared modules. Basically, you will have to fix the source of the application so that it does not try to provide symbols for the modules from the main executable. Windows DLLs cannot have undefined symbols like Linux in its shared objects. - -- VH -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) iEYEAREIAAYFAkpx28gACgkQr2CghdezFMl+SwCdFFXvm9DAXyuma25eCMP4Os3I 5dkAn0RMNF1ydVNIxGP2XOlxDKCSNPTP =u5pm -----END PGP SIGNATURE----- -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple