A General Question on Linking

Malcolm Boekhoff Malcolm.Boekhoff@actfs.co.uk
Fri Mar 9 08:25:00 GMT 2001


If I have "../libsmutil/libsmutil.a" at the *end* of a command like:

    + gcc -o sendmail main.o alias.o arpadate.o bf_portable.o clock.o collect.o conf.o control.o convtime.o daemon.o deliver.o
domain.o envelope.o err.o headers.o macro.o map.o mci.o milter.o mime.o parseaddr.o queue.o readcf.o recipient.o savemail.o sfsasl.o
shmticklib.o srvrsmtp.o stab.o stats.o sysexits.o timers.o trace.o udb.o usersmtp.o util.o version.o ../libsmutil/libsmutil.a

does that mean that the default C library is not searched last?

I am asking, because the above command is producing this, but surely "sys_nerr" is defined in libc.a or one of the standard
libraries?:

 main.o(.text+0x5fc1): undefined reference to `setgroups'
 conf.o(.text+0x2281): undefined reference to `setusershell'
 conf.o(.text+0x2289): undefined reference to `getusershell'
 conf.o(.text+0x22bb): undefined reference to `endusershell'
 deliver.o(.text+0x40da): undefined reference to `setgroups'
 deliver.o(.text+0x4186): undefined reference to `setgroups'
 deliver.o(.text+0x7e22): undefined reference to `setgroups'
 err.o(.text+0x14e5): undefined reference to `sys_nerr'
 err.o(.text+0x14ee): undefined reference to `sys_errlist'
 err.o(.text+0x17de): undefined reference to `sys_nerr'
 err.o(.text+0x17e7): undefined reference to `sys_errlist'
 map.o(.text+0x17c2): undefined reference to `_imp__dbm_open'
 map.o(.text+0x1841): undefined reference to `_imp__dbm_dirfno'
 map.o(.text+0x184e): undefined reference to `_imp__dbm_pagfno'
 map.o(.text+0x1862): undefined reference to `_imp__dbm_close'
 map.o(.text+0x18e8): undefined reference to `_imp__dbm_close'
 map.o(.text+0x1a9e): undefined reference to `_imp__dbm_dirfno'
 map.o(.text+0x1bdd): undefined reference to `_imp__dbm_fetch'
 map.o(.text+0x1c1f): undefined reference to `_imp__dbm_fetch'
 map.o(.text+0x1ebb): undefined reference to `_imp__dbm_store'
 map.o(.text+0x2024): undefined reference to `_imp__dbm_store'
 map.o(.text+0x20c0): undefined reference to `_imp__dbm_close'
 queue.o(.text+0x9ae): undefined reference to `minor'
 queue.o(.text+0x9c5): undefined reference to `major'
 util.o(.text+0x2011): undefined reference to `minor'
 util.o(.text+0x2025): undefined reference to `major'
 ../libsmutil/libsmutil.a(snprintf.o)(.text+0x4df): undefined reference to `sys_nerr'
 ../libsmutil/libsmutil.a(snprintf.o)(.text+0x51c): undefined reference to `sys_errlist'
 collect2: ld returned 1 exit status
 make[1]: *** [sendmail] Error 1





--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list