I've solved this, but I would like to know if there's a
more robust solution.
The problem apparently is with the order of things on the
link line -- you can see I have my -l's appearing before the .o's. If I place
the .o's first I don't have the unresolved references.
Is there a better way to do things, which doesn't result in
command line ordering requirements?
I'm trying to link
my application, which requires 3 libraries that I've built. Nothing particularly
out of the ordinary, but I get unresolved references which just aren't making
arm-linux-gcc version 3.4.5, as built from the Gumstix
buildroot. Any experts in gcc/libraries out
application (partial output):
/opt/gumstix/build_arm_nofpu/staging_dir/bin//arm-linux-gcc -o myapp -L/usr/local/src/mytools/libs -L../platform -ldevice myapp.o
myapp.o: In function
/root/ae_linux/application/myapp.c:138: undefined reference to `MyInitModuleStorageTable'
/root/ae_linux/application/myapp.c:147: undefined reference to `MyVersion'
/root/ae_linux/application/myapp.c:149: undefined reference to `MyInit'
/opt/gumstix/build_arm_nofpu/staging_dir/bin/arm-linux/nm /usr/local/src/mytools/libs/libdevice.a | grep
00000000 T MyInit
if I extract all .o's from libdevice.a and, for example, include api_MyInit.o on
the link line, the unresolved reference to MyInit goes away. I believe from this
that there's nothing wrong with my .o files.
tried including multiple -l's on the link command but this hasn't gotton me any
closer to getting things to link.
information in this message is intended for the personal and confidential
of the designated recipient(s) named above. To the extent the
recipient(s) is/are bound
by a non-disclosure agreement, or other agreement
that contains an obligation of
confidentiality, with AuthenTec, then this
message and/or any attachments shall be
considered confidential information
and subject to the confidentiality terms of that
agreement. If the
reader of this message is not the intended recipient named above, you
notified that you have received this document in error, and any review,
distribution or copying of this message is strictly
prohibited. If you have received this
document in error, please delete the
original message and notify the sender immediately.
AuthenTec, Inc. http://www.authentec.com