Qt 5.3.1 static build on OSX 10.9
I've been struggling for a few days trying to get a static build of Qt created with all the appropriate symbols defined. The overall goal is to create a small static library that can read/validate some XML files, nothing too fancy. Using the following configure line:
./configure -static -no-framework -nomake examples -nomake tests
Results int he build succeeding. However, when linking to create the library, I get a host of linker errors with undefined symbols. An example:
Undefined symbols for architecture x86_64:
"QArrayData::deallocate(QArrayData*, unsigned long, unsigned long)", referenced from:
EGIXML::EGIXMLFileReader::validate(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libEGIXML.a(EGIXMLFileReader.cpp.o)
Upon further inspection:
$ nm /usr/local/Qt-5.3.1/lib/libQt5Core.a | grep QArrayData | grep deallocate
ALL symbols matching the greps are tagged as undefined.
If I do the same thing in a shared library build, I get no undefined symbols. Am I just missing something super obvious that I just forgot somewhere? I have verified (using the verbose build flags) that things are being build with -fPIC
Thanks in advance.
did you finally compile Qt statically on OSX?
No, I could not get a static build to work. Instead, I am enforcing the dynamic libraries instead.