On 10/14/2011 08:45 AM, David Aldrich wrote:
Hi Peter
Thanks for your reply.
-shared is not a libtool flag
Oh, that's weird! We've been using that option for building other shared
libraries for a long time.
Yes, and older libtools used to pass it along to the compiler driver, so
on systems using gcc/g++ or where the compiler accepted the -shared flag
to create a shared library it would work.
does it work if you do:
libtool --mode=link g++ -o libGUI.la<object files> -rpath /usr/local/lib
That doesn't work, but the result is different:
libtool --mode=link g++ -o libGUI.la<my obj files> -rpath /usr/local/lib
-rpath /usr/lib64 -L/usr/lib64 -pthread -L/usr/lib64 -lwx_gtk2u_richtext-2.8
-lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8
-lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_xml-2.8 -lwx_baseu_net-2.8
-lwx_baseu-2.8 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0
-lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig
-lgobject-2.0 -lgmodule-2.0 -lglib-2.0
*** Warning: Linking the shared library libGUI.la against the non-libtool
*** objects<my obj files> is not portable!
Your object files are created without using libtool?
ln: creating symbolic link `libGUI.so.0': Operation not supported
make: *** [libGUI.so] Error 1
That's a new one for me, you snipped the ln command that fails though.
I don't know how much you care about portability, if you aren't worried
about it (previously your Makefile with older libtool would only create
working shared libraries with compilers that understand -shared and
where the shared library extension is .so), then you may be better off
not using libtool at all, and just doing
g++ -shared -o libGUI.so ....
That does exclude Windows, Mac OS X, HP-UX, though, just on the ".so".
Peter
_______________________________________________
https://lists.gnu.org/mailman/listinfo/libtool