libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

static linking problem on Mac OS X Lion


From: Werner LEMBERG
Subject: static linking problem on Mac OS X Lion
Date: Fri, 23 Mar 2012 13:58:38 +0100 (CET)

[libtool 2.4.2]

Folks,


I have a problem with libtool on Mac OS X Lion, trying to link
statically to (a statically compiled version of) Qt.  Saying

  make LDFLAGS="-all-static" V=1

I get this link command together with the error message.

/bin/sh ../libtool \
  --tag=CXX \
  --mode=link \
  g++ -pipe -O2 \
      -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 \
      -Wall -W \
      -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB \
      -g -O2 \
      -headerpad_max_install_names \
      -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 \
      -all-static \
      -o ttfautohintGUI \
      ttfautohintGUI-main.o ttfautohintGUI-maingui.o \
      ttfautohintGUI-maingui.moc.o \
      ../lib/libttfautohint.a \
      ../gnulib/src/libgnu.la \
      /usr/local/lib/libfreetype.la \
      -L/usr/local/Trolltech/Qt-4.8.0/lib -lQtGui \
      -L/usr/local/Trolltech/Qt-4.8.0/lib \
      -framework ApplicationServices \
      -framework CoreFoundation \
      -framework Carbon \
      -framework AppKit \
      -lQtCore -lz -lm  

libtool: link:
  warning: complete static linking is impossible in this configuration
libtool: link:
  cannot find the library `' or unhandled argument `ApplicationServices'

To me, this looks like a bug in libtool related to the `-framework'
argument; the `-all-static' works just fine on GNU/Linux and with
minGW.  Note that I don't care that not all libraries can be linked
statically; it's only important that QtGui and QtCore stuff is put
into the binary.

Any idea how to circumvent this problem?


   Werner



reply via email to

[Prev in Thread] Current Thread [Next in Thread]