Date: Wed, 8 May 2002 20:44:09 -0400 From: Mikhail Teterin <mi+mx@aldan.algebra.com> To: questions@FreeBSD.org, current@FreeBSD.org Subject: does the order of .a files matter? Message-ID: <200205082044.09459.mi%2Bmx@aldan.algebra.com>
next in thread | raw e-mail | index | archive | help
Hello! I'm trying to port a huge application to FreeBSD. The app's build process creates over a hundred of static libraries (.a) and then tries to link them (and a few object files) into the executable. The process seems to work fine on the existing platforms (a number of Unixes and NT), but on FreeBSD I keep getting unresolved symbols. The most frustrating thing is, the number of such symbols varies greatly with the order, in which I list the libraries on the command line. Is not the linker supposed to make several runs over the given libraries if needed? Each .a is created "by the book": ar cq lib<NAME>.a `lorder ${<NAME>_OBJS} | tsort -q` ranlib lib<NAME>.a and the executable creation is: cc ... -o <exe> ${<exe>_OBJS} ${<exe>_LIBS} ... It "almost" works, if I try to bypass the libraries completely and just link all of object files, but for the real application I hit the shell's limit on the number of arguments -- there are too many object files. Any suggestions? Thanks a lot! -mi P.S. This is on ``FreeBSD 5.0-CURRENT #2: Fri Apr 26 13:04:00 GMT 2002'' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200205082044.09459.mi%2Bmx>