So i have installed the latest version of polyml on my mac . How can I run the compiler to start using it??
for sml it is farily simple, i just type 'sml' and it starts working?
rlwrap poly
will make your life easier
We want our software to support OSX Versions down to 10.9. In XCode you can set the target version, that is no problem, but we have another lib that gets linked in the projekt which is built using cmake. Now XCode complains that the lib is build for 10.11, but our project is 10.9. Can I somehow tell clang on the command line to compile for an older version?
The only information I have found is to set OSX_VERSION as variable, but it seems to have no effect.
Thanks in advance!
From clang --help:
-mmacosx-version-min=<value>
Set Mac OS X deployment target
Do be on the lookout for gotchas with earlier deployment targets, and make sure you test all the OS versions you support.
So I just installed qt around 5 minutes ago, and when I wanted to code a simple line of text in the Push Button and try to run it, I got this error:
:-1: error: Could not resolve SDK path for 'macosx10.8'
Could anyone help? Also, if you need me to do something, could you explain like I'm five please. (Not actually like I"m five but I hope you know what i mean)
The problem is that the online installer for Qt currently supports OSX 10.8 (Mountain Lion) by default, and I'm guessing you are on 10.9 (Mavericks) or greater.
There is a workaround:
Navigate to where you installed Qt (default /Users/your username/Qt) using finder
Go to the subdirectory 5.3/clang_64/mkspecs directory
Open the file called qdevice.pri with a text editor
Change the line
!host_build:QMAKE_MAC_SDK = macosx10.8
to:
!host_build:QMAKE_MAC_SDK = macosx10.9 if you are on OS X 10.9 (Mavericks), or
!host_build:QMAKE_MAC_SDK = macosx if you are on OS X 10.10 (Yosemite)
Save the file and restart Qt Creator
I'm running Qt 5.7.1 on Mac OS 10.12.2.
None of the above answers involving adding !host_build:QMAKE_MAC_SDK = macosx10.12 to a file worked for me.
What did work was a small reconfigure on the XCode side of things as described here, the key step being entering
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
in the command line.
What caused the problem for me was that I installed the XCode command line tools before installing XCode itself which apparently makes it hard for Qt to find the Mac OS SDK.
For Qt 5.7 and macOS Sierra
Navigate to where you installed Qt (default /Users/your username/Qt) using finder
Go to the subdirectory 5.7/clang_64/mkspecs directory
Open the file called qdevice.pri with a text editor
Add line on end file
!host_build:QMAKE_MAC_SDK = macosx10.12
add
QMAKE_MAC_SDK = macosx10.12
to your .pro file. Done and Done. (for some, qdevice.pri does not contain the !host_build line, and adding it does nothing, so just set the variable directly in the .pro file).
I have confirmed that you will eventually also have to implement this https://github.com/Homebrew/formula-patches/blob/master/qt5/xcrun-xcode-8.patch: which is just a matter of changing one line in your default_pre.prf file (for your appropriate machine aka Mac/PC, etc...)
I recently upgraded from OSX 10.8 to 10.12 and ran into this using Qt 5.7
The issue was resolved by a combination of:
1) FranklinA's suggestion:
Open Xcode->Preferences->Locations->command line tools..select the CLT
xcode-select active developer directory error
..and..
2) adding to the .pro file the following line:
QMAKE_MAC_SDK = macosx10.12
Coming to this late.
I had this error an all I needed to do was open up the actual Xcode app (which for some reason was not findable by spotlight but was in the applications folder), accept some terms, and let it do some config.
In QT 5.7.0, Xcode 8.0 (8A218a), Mac OSX El Capitan (10.11.6), this issue happened from sudden in already configured environment. 5.7/clang_64/mkspecs/qdevice.pri no longer contains QMAKE_MAC_SDK line to modify.
I suspect some XCode part got silent update and I issue appeared again. This worked:
open XCode and let it reconfigure again (automatic action upon start)
delete .pro.user file from the project
reopen project in QT
Using QT 5.7.0, Mac OSX Sierra (10.12), XCode 8.0, I got the typical error coming from searching in:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
instead of:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
Adding the line
!host_build:QMAKE_MAC_SDK = macosx10.12
to the Qt/5.7/clang_64/mkspecs/qdevice.pri file, worked for me.
In my case , I have just opened xcode again. It start installing some components. Once it finished , I open Qt again and everything start working fine.
All I had to do was accept the Xcode licence by running: sudo xcodebuild -license accept
was it ever possbile to create a C++ command line tool as a fat binary in XCode (32bit and 64bit in one file)? I thought it was, but if I try it now, XCode hangs during "Creating Universal Binary."
I updated to OSX Mavericks and I am using XCode 4.6.2. It doesn't matter which compiler I choose. As soon as I set "Build Active Architecture Only" to false, the compiler hangs during "Creating Universal Binary".
Additionally I am building a static C++ library in my project which has no problems to be build for 32 and 64 bit in one file.
I hope you can help me.
Cheers
Georg
I had the same problem after updating to Mavericks. Both Xcode 4.6.3. and Xcode 3.2.6 were hanginig endlessly during "Creating Universal Binary."
As it's the lipo command line tool that's creating the universal binaries I did some research and found this discussion which solved my problems:
Installing psycopg2 has it stuck between xcrun and lipo
According to the answers given there Xcode apparently didn't find lipo in the end but unfortunately shows no error message in this case.
After backing up the 10.9 version of /usr/bin/lipo and linking in /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo as described in the post creating the universal binaries was working again.
I have problem with Sublime Text 2 and C++, after Mavericks (10.9) OS X update when i complie it cant find librarys and gives me an error
error: 'endl' was not declared in this scope
and the same is with cout, cin and I am prety sure its with all the iostream functions
and yes I did include iostream
I had a similar issue with this where SublimeClang's diagnostics couldn't find any libraries (iostream, string, etc..) after upgrading to Mavericks.
The solution for me was to reinstall Xcode command line tools.
xcode-select --install
From what you've said I'd suggest giving this a shot. Source