Skip to content

Silo_on_OS_X

miller86 edited this page Mar 24, 2019 · 1 revision

Silo on OS X

Use Qt installed as libraries in /opt/local

./configure --enable-silex --with-Qt-lib="m -L/opt/local/lib -lQtGui -lQtCore" --with-Qt-dir=/opt/local

Use Qt installed as a framework in some user-specified directory

--with-Qt-lib="m -F/Users/miller86/visit/visit/qt/4.8.3/i386-apple-darwin12_gcc-4.2/lib -framework QtGui -framework QtCore" \
--with-Qt-dir=/Users/miller86/visit/visit/qt/4.8.3/i386-apple-darwin12_gcc-4.2

The argument to --with-Qt-lib needs to be quoted because it will contain spaces. Next, the initial m is needed because the configure logic (taken from TrollTech many years ago) assumes that the right thing to do is to prepend a -l to it for the linker. So, we put a m as the first term there to make it resolve to -lm which is a library Silo actually needs anyways. The remaining terms depend on whether you are attempting to use Qt as a library or a framework. Using it as a library should be self-explanatory. As a framework, in the --with-Qt-lib argument are a -F which I think of as Mac OS X’s -L option followed by the names of the two Qt libraries Silo’s silex tool needs, QtGui and QtCore but each prepended by -framework, another Mac OS X specific flag that tells the compiler to use the .framework dirs of the installed Qt. Finally, we still need the --with-Qt-dir term so that the configure logic will find the include dir and ultimatly find Qt header files.