PDA

View Full Version : Build Qt-based app on Mac OS X, head file not found



leonardyu
24th February 2015, 14:28
I’m building vapor (www.vapor.ucar.edu) 2.3.0 source code on Mac OS X 10.9.5 (Mavericks) with clang 6.0. In short, vapor is scientific visualization software that use Qt for its GUI. Qt 4.8.3 was installed from binary package instead of from the source, that is, Qt is installed as a framework at /Library/Frameworks. After issuing the ‘make’ command in the terminal, I get the error message:

-------------------------------------------------------------------------------
Building libparams.dylib for Darwin_x86_64 (DEBUG)
-------------------------------------------------------------------------------
make -f Makefile recurse INCLUDEDEPS=1
Compiling datastatus.cpp
g++ -fno-common -o ../../targets/Darwin_x86_64/built/params/datastatus.o -c -DDARWIN -Wall -Wno-format -Wno-sign-compare -fPIC -mmacosx-version-min=10.6 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -Wno-overloaded-virtual -m64 -g -DDarwin -DQT_OPENGL_LIB -DQT_GUI_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../include -I. -I/usr/local/include -I/Library/Frameworks/QtCore.framework/Headers -I/Library/Frameworks/QtGui.framework/Headers -I/usr/include/python2.7 -I/usr/lib/python2.7/site-packages/numpy/core/include -DMODELS datastatus.cpp
In file included from datastatus.cpp:31:
/Library/Frameworks/QtCore.framework/Headers/qstring.h:45:10: fatal error:
'QtCore/qchar.h' file not found
#include
^
1 error generated.
make[3]: *** [../../targets/Darwin_x86_64/built/params/datastatus.o] Error 1
make[2]: *** [dep] Error 2
make[1]: *** [params.subdir] Error 2
make: *** [lib.subdir] Error 2

I check the Qt installation directory and find that QtCore is not a directory as in Linux
$ cd /Library/Frameworks/QtCore.framework/
$ ls -l
total 24
drwxrwxr-x 3 root admin 102 9 11 2012 Contents
lrwxr-xr-x 1 504 wheel 18 11 10 07:53 Headers -> Versions/4/Headers
lrwxr-xr-x 1 504 wheel 17 11 10 07:53 QtCore -> Versions/4/QtCore
-rw-rw-r-- 1 root admin 989 9 11 2012 QtCore.prl
drwxrwxr-x 5 root admin 170 11 10 07:53 Versions
$ ls -l Versions/4/QtCore
-rw-rw-r-- 1 root admin 3607760 9 11 2012 Versions/4/QtCore

What’s strange is that my other Xcode projects that use Qt do not have this issue. So I need some help. Thanks in advance.

wysota
24th February 2015, 23:00
Is the software using Qt4 or Qt5?

leonardyu
25th February 2015, 13:41
It uses Qt 4

wysota
25th February 2015, 14:01
Do you have that include file in your framework?