[Development] OSX: building against the 10.6 SDK with Qt 5.1?

Josh Faust jfaust at suitabletech.com
Tue Apr 2 23:17:49 CEST 2013


Looks like it's a problem with using the g++ binary xcrun finds:

$ xcrun -sdk macosx10.6 g++ test.cpp -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk
-mmacosx-version-min=10.6 -o test
ld: library not found for -lstdc++
collect2: ld returned 1 exit status
$ g++ test.cpp -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk
-mmacosx-version-min=10.6 -o test
$

$ xcrun -f -sdk macosx10.6 g++
/Applications/Xcode.app/Contents/Developer/usr/bin/g++
$ /Applications/Xcode.app/Contents/Developer/usr/bin/g++ test.cpp -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk
-mmacosx-version-min=10.6 -o test
ld: library not found for -lstdc++
collect2: ld returned 1 exit status


On Tue, Apr 2, 2013 at 2:01 PM, Sorvig Morten <Morten.Sorvig at digia.com>wrote:

>
> On Apr 2, 2013, at 9:51 PM, Josh Faust <jfaust at suitabletech.com> wrote:
>
> > Actually, this seems to go beyond just using a custom SDK path. If I
> place the 10.6 SDK alongside the others inside the Xcode application folder
> and configure with:
> > ./configure -developer-build -release -opensource -confirm-license
> -shared -nomake examples -nomake demos -nomake docs -no-c++11 -platform
> macx-g++ -sdk macosx10.6
> >
> > It fails with:
> >
> > Determining architecture... ()
> > /Applications/Xcode.app/Contents/Developer/usr/bin/g++ -c -pipe -g
> -gdwarf-2 -Wall -W -isysroot
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk
> -mmacosx-version-min=10.6 -fPIE  -I../../mkspecs/macx-g++ -I. -o arch.o
> arch.cpp
> > /Applications/Xcode.app/Contents/Developer/usr/bin/g++
> -headerpad_max_install_names
> -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk
> -mmacosx-version-min=10.6 -o arch arch.o
> > ld: library not found for -lstdc++
> > collect2: ld returned 1 exit status
> > make: *** [arch] Error 1
> > Unable to determine architecture!
> >
> > Before I file a ticket, is building against 10.6 supposed to work with
> 5.1?
>
> Yes, that's supposed to work. libstdc++ is the correct standard library to
> link against for 10.6, so it's a bit strange that it fails.
>
> Morten
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20130402/d3acf8dc/attachment.html>


More information about the Development mailing list