Just for reference here, some people on the gcc-help list
gave me a work-around for this issue.
The work around is to link in the whole archive, via:
ADDITIONAL_LDFLAGS=-Wl,--whole-archive,/full/path/to/lib1.a,/full/path/to/lib2.a,...,--no-whole-archive
Here, /full/path/to/lib1.a is a static library containing the same
symbols that i wanted to link in.
But i would still like to be able to place my LDFLAGS anywhere i want
in the gnustep GNUmakefile, so if there is a way of doing that somebody
please let me know.
(It would be better because it would be more natural and i could use the
-l abbreviation for libraries which is probably more portable.)
So thanks in advance for any clues on that front, or maybe a pointer to
the docs (because maybe it's right there but i'm just looking over it??).
dan
On Wed, Sep 26, 2012 at 1:49 PM, Dan Hitt <dan.hitt@gmail.com> wrote:
I'm building a command line program (using tool.make) and
i need to add a library.
I understand from the internet that in order to add a flag for
the linker i use
ADDITIONAL_LDFLAGS=-lblahblahblah
By using "make messages=yes" i can verify that indeed the
extra library is getting added.
But it is getting added to the front of the list, while it needs
to be added to the end of the list in order to get all the
symbols resolved. (If i manually form the command by
moving the library from the first place on the list to the
last place i have verified that all symbols indeed resolve
if the library is placed last.)
So . . . what should i do to get my linker argument to the
end of the list?
Thanks in advance for any clues or pointers.
dan