Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: linking problem -- (c++ ABI compatibility issue?)



So this can be an issue with GNU libtool when used to
generate dynamic libraries on OS X. The problem is
that GNU libtool scripts have a line:
CC="gcc"
which means that the C compiler is invoked for the
linking step. Changing the line to read:
CC="g++"
solved the problem for me (with a different library).

Hope this helps,

Kevin
--- Craig Maloney <email@hidden> wrote:
> Hi all. I'm new to Darwin/Jaguar, and I hope this
> is the right forum
> for help.
>
> I'm trying to link against libplotter from gnu
> plotutils. I installed
> libplotter and libplotter-dev from fink which put
> the appropriate
> libraries in /sw/lib and headers in /sw/include.
>
> Now the linker gives an error that it can't find
> certain symbols which
> are clearly there when I look at the symbol table.
> Does anyone have a
> guess as to what is going on? c++ ABI issues?
> (presumably fink built
> libplotter.2.2.1.dylib with the same g++ I'm
> building *my* code with)
>
> Linker can't find the symbols (for instance
> Plotter::openpl()):
> +++++++++++++++++++++++++++
> [maloney5@kimba:~/projects/working/mols/src/test]$
> make makeImage
> gcc -L/sw/lib -g makeImage.o -lstdc++ -lgslcblas
> -lgsl -lplotter -o
> makeImage
> ld: Undefined symbols:
> ....
> Plotter::openpl()
> ...
>
> But it is really there:
> ++++++++++++++++++++++++++++
> [maloney5@kimba:~/]$ nm /sw/lib/libplotter.dylib |
> c++filt | grep openpl
> ....
> 00023044 T Plotter::openpl(void)
> ....
> ++++++++++++++++++++++++++++++
>
> If anyone has any clues or pointers to info, I'd
> appreciate it. There
> are other symbols which can't be found with less
> trivial call
> signatures, but I thought I'd give the most trivial
> example.
>
> Thanks in advance.
>
> Cheers,
> Craig
> _______________________________________________
> darwin-development mailing list |
> email@hidden
> Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/darwin-development
> Do not post admin requests to the list. They will be
ignored.


=====
Kevin Thornton
Committee on Genetics
University of Chicago
http://www.molpopgen.org

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.

References: 
 >linking problem -- (c++ ABI compatibility issue?) (From: Craig Maloney <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.