This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Creation of a shared module (gcc -shared) , undefined references


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]