[Development] osx search paths with 5.3.2

Thiago Macieira thiago.macieira at intel.com
Mon Oct 13 18:10:22 CEST 2014


On Monday 13 October 2014 11:23:11 Matt Broadstone wrote:
> Thanks for the quick response. The things that are not found are for
> isntance, "/usr/include/qjsonrpc/qjsonrpcmessage.h". I can fix this
> manually by adding "/usr/include" to my INCLUDEPATH - no problem, but
> definitely wasn't a requirement on the exact same machine with the qt
> 4.8.6 install (maybe a more basic question: is this just something
> that changed in 5.x mkspecs?). My compile lines with 4.8.6 installed
> add -I/usr/include to the compile lines, while the 5.3.2 install does
> not. Additionally, adding "-L/usr/lib" to my LIBS line in the pro file
> with 5.3.2 still breaks and can't find files that are definitely
> there. I'll pour through this "qmake -d -d -d" now and see if I can
> provide any more information.

The difference is the way we call the compiler on OS X, starting with Qt 5.1 or 
5.2. We now tell it to use the Apple sysroot that is present inside the XCode 
bundle. That means it will not search /usr/incude or /usr/lib -- instead, it 
will only use the libs that are inside that sysroot. That way, we're 
guaranteed to use only libraries that are always present on the target OS 
version. Previously, it was easy to make mistakes in depending on libraries 
that Apple doesn't ship just because they were in /usr/lib.

On OS X, you should not link to libs in /usr/lib. Instead, make sure they are 
proper frameworks and that they get deployed into your app's bundle.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list