From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Sat, 2 Apr 2005 18:52:07 +0400 From: "Dmitry V. Levin" To: ALT Devel discussion list Subject: Re: [devel] Q: linker & -z defs Message-ID: <20050402145207.GB18427@basalt.office.altlinux.org> Mail-Followup-To: ALT Devel discussion list References: <20050401204831.GA24191@lrn.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5I6of5zJg18YgZEa" Content-Disposition: inline In-Reply-To: <20050401204831.GA24191@lrn.ru> X-fingerprint: 9658 398D 181B 1200 8FC5 26B8 F6F8 846B C1E2 3429 X-BeenThere: devel@altlinux.ru X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ALT Devel discussion list List-Id: ALT Devel discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Apr 2005 14:52:08 -0000 Archived-At: List-Archive: List-Post: --5I6of5zJg18YgZEa Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Sat, Apr 02, 2005 at 12:48:31AM +0400, Anton D. Kachalov wrote: > =EE=C1=D4=CB=CE=D5=CC=D3=D1 =CE=C1 =D4=C1=CB=D5=C0 =CE=C5=D0=D2=C9=D1=D4= =CE=CF=D3=D4=D8 =D3 pkgconfig + gtk+-2.0. > $ pkg-config --libs "gtk+-2.0" > -lgtk-x11-2.0 >=20 > $ gcc -shared -o foobar.so -Wl,-z,defs foobar.c -lgtk-x11-2.0 > /tmp/ccML0lkr.o(.text+0x7): In function `foobar': > : undefined reference to `gdk_x11_display_get_xdisplay' > collect2: ld returned 1 exit status >=20 > =C6=C1=CA=CC foobar.c: > <=CB=D5=D3=D8> > extern void gdk_x11_display_get_xdisplay(); >=20 > void foobar() > { > gdk_x11_display_get_xdisplay(); > } > >=20 > =C5=D3=CC=C9 =CC=C9=CE=CB=CF=D7=C1=D4=D8=D3=D1 =D4=C1=CB: > $ gcc -shared -o foobar.so foobar.c -lgtk-x11-2.0 > =C9=CC=C9 =D4=C1=CB: > $ gcc -shared -o foobar.so -Wl,-z,defs foobar.c -lgtk-x11-2.0 -lgdk-x11-2= .0 > =D4=CF =D7=D3=A3 =D0=D5=DE=CB=CF=CD. >=20 > =F7=CF=D0=D2=CF=D3 =D7 =D3=CC=C5=C4=D5=C0=DD=C5=CD, =CB=D4=CF =CE=C5=D0= =D2=C1=D7? =EF=C2=CF=C2=DD=A3=CE=CE=CF=C5 =D0=D2=C1=D7=C9=CC=CF: =E5=D3=CC=C9 ldd -r /usr/lib/libgtk-x11-2.0.so =CE=C1=CA=C4=A3=D4 =DE=D4=CF-=CE=C9=C2=D5=C4=D8 undefined, =DA=CE=C1=DE=C9= =D4, =CE=C1=C4=CF =C6=C9=CB=D3=C9=D4=D8 =DC=D4=D5 =C2=C9=C2=CC=C9=CF=D4=C5= =CB=D5. =E5=D3=CC=C9 =CE=C5 =CE=C1=CA=C4=A3=D4, =DA=CE=C1=DE=C9=D4, =C6=C9=CB=D3=C9= =D4=D8 =CE=C1=C4=CF =D4=D7=CF=CA makefile. --=20 ldv --5I6of5zJg18YgZEa Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFCTrGX9viEa8HiNCkRAv57AJ4rtRuva3lLi/H7lfnBm/vQ1Q4Z1ACdEq9v S9hAl1bD+Pcf2Bau2mM6fJE= =ELc2 -----END PGP SIGNATURE----- --5I6of5zJg18YgZEa--