You have to have libmysqlclient.so in /usr/lib/mysql ---- Lev Assinovsky Aelita Software Corporation O&S InTrust Framework Division, Team Leader ICQ# 165072909 > -----Original Message----- > From: Admin-Stress [mailto:meerkapot@xxxxxxxxx] > Sent: Tuesday, March 23, 2004 3:48 AM > To: gcc-help@xxxxxxxxxxx > Subject: Different binary size > > > I compiled a program in two machines, both are using the same > gcc, MySQL library, and glibc (both > are RedHat 9). > > The first machine (MACHINE_1) produced 20 KB binary size, but > in second machine (MACHINE_2) > produced 181 KB binary size. > > I know that the problem is MACHINE_2 cant dynamically link > the libray. How can I fix this in > MACHINE_2 so it can produce dynamic link? > > Here is my compile script : > > gcc -o iaac iaac.c -I/usr/include/mysql -L/usr/lib/mysql > -lmysqlclient -lz > > Please help me. > > in MACHINE_1 : > > $ ldd iaac > libmysqlclient.so.12 => /usr/lib/libmysqlclient.so.12 > (0x4001c000) > libz.so.1 => /usr/lib/libz.so.1 (0x40052000) > libc.so.6 => /lib/libc.so.6 (0x40060000) > libcrypt.so.1 => /lib/libcrypt.so.1 (0x40187000) > libnsl.so.1 => /lib/libnsl.so.1 (0x401b3000) > libm.so.6 => /lib/libm.so.6 (0x401c7000) > libnss_files.so.2 => /lib/libnss_files.so.2 (0x401e8000) > libnss_dns.so.2 => /lib/libnss_dns.so.2 (0x401f3000) > libresolv.so.2 => /lib/libresolv.so.2 (0x401f7000) > /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) > > in MACHINE_2 : > > $ ldd iaac > libz.so.1 => /usr/lib/libz.so.1 (0x4001d000) > libc.so.6 => /lib/i686/libc.so.6 (0x4002c000) > /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) > > > __________________________________ > Do you Yahoo!? > Yahoo! Finance Tax Center - File online. File on time. > http://taxes.yahoo.com/filing.html >