When I try to build my app for 10.4, ppc, I get the following error:
GCC 4.2 is not compatible with the Mac OS X 10.4 SDK (file MBM.m)
What does this mean, and how can I stop it and build for 10.4?
MBM.m: http://localhostr.com/files/bb385f/MBM.m
Sorry for the brief explanation, but I have to go.
Please help,
HiGuy S
You need to change your compiler. Edit the active target (Project -> Edit Active Target) and find the C/C++ Compiler Version setting to change it to an older version of GCC. I think version 3 is appropriate; if you don't have it, and if I recall correctly, it's an optional install with the Developer Tools you should have on your Mac OS X CD.
Related
I have a c ++ code that I wrote that uses almost nothing, which is not the language itself (except using osascript).
After compiling it on my operating system version (10.14.5) with the following flags:
D_DEBUG, Os, Wall, Wextra
I found that it was not running on older operating systems (in 10.13 for example - it raises an error that it can only run on 10.14 or later)
What are the right flags to use to tell GCC, that I want to support as many MacOs versions as possible?
You will need a versioning flag: -mmacosx-version-min=10.9
And let the compiler know where the SDK is: -isysroot= =/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk
The older SDKs are available in older xcode bundles, or via https://github.com/phracker/MacOSX-SDKs/releases. You need to decompress the SDK and place the folder inside the xcode bundle, as shown in the sysroot flag above.
Apple sayeth: You must target your compile for the oldest version of OS X on which you want to run the executable. In addition, you should install and use the cross-development SDK for that version of OS X. For more information, see SDK Compatibility Guide
When I searched for a mac os x opengl tutorial and tried to build it, I got the following error message. I tried to change "OS X Deployment Target" to 10.10 Yosemite (which I am running), but it has no effect. I can't find any documentation online to explain what might be going wrong, nor could I find any tutorials about XCode 7. Any ideas on what I'm doing wrong?
"My Mac runs OS X 10.10.5, which is lower than tutorial01_first_window’s minimum deployment target. Change your project’s minimum deployment target or upgrade My Mac’s version of OS X."
Here is the original tutorial I downloaded and built with CMake according to the instructions:
http://www.opengl-tutorial.org/beginners-tutorials/tutorial-1-opening-a-window/
I ran into the exact same thing. I'm running 10.10.5 Yosemite and am using Xcode 7.0.1 with CMake 3.3.2 and it insisted on generating 10.11 deployment targets.
This answer is a bit dated, but it got me a long way towards a solution:
https://stackoverflow.com/a/26329890/2059999
I can get it to work by manually setting the OS X Deployment Target on the target binary in my project to 10.10, but CMake will clobber my change each time it gets re-run which is annoying.
I ran into this problem after a recent upgrade of Xcode (Version 7.0.1). It turns out that the default deployment target for it is OS X 10.11, which is higher than the one I have. The solutions above do work. However, to set this "permanently" in CMake, find the advanced option "CMAKE_OSX_DEPLOYMENT_TARGET" and set it to the one on your system, e.g. 10.10.
Setting CMAKE_OSX_DEPLOYMENT_TARGET
I was having this message with homebrew and updating Xcode from 7.3.1 to Xcode 8.1 fixed it
The ironic thing is that all this used to work on my Mac, but Apple no longer supports 10.5.8, so I was forced to update to Snow Leopard, 10.6. And everything broke (thank you Apple).
On the surface, it seems simple. Build an open source package like octave under Snow Leopard (Mac OS X 10.6)
Apple has made this difficult, to say the least. They no longer download XCode for older operating systems unless you are a paid developer. My Macbook pro 2.16Ghz cannot load Lion, so that option is not available.
My old fink doesn't work because it was old. In order to build a new one, I need Xcode 3.2, which I can't get (see above).
I downloaded a free gcc 4.2, and it works fine.
So in order to try to build octave, it's the old style gnu install:
./configure
make
make install
./configure fails because there is no fortran installed. That's a special case because the install of gcc didn't include fortran. So a fallback would be building a complete gcc which I have done in the past.
downloaded gcc 4.9:
gcc-4.9-20130728
inside, gcc49
gcc can't build because it needs the three subsidiary packages gmp, mpfr and mpc
I am now trying to build these, so that I can bootstrap a complete gcc build, but in the meantime, is there any simpler way to bootstrap these things? I find it hard to understand why no binaries are available for:
fink
octave
which would solve part of my current problems.
You can still get XCode. You just have to be registered on Apple Developer, but you do not have to pay for the license. You then download it through the Mac App store, or you can get a link that opens it in the App store here. Finally, you have to install the command line tools from within Xcode. These can be found under the Components tab of the Download Preferences panel.
Let me know if that does not help. My iMac running 10.6 is currently in for repairs, so I am on my 10.7 laptop and cannot test all the specifics yet.
I've installed Xcode and I can compile .cpp files in Xcode. However, I wanna use g++ in Terminal but command not found: g++ now.
My OS is Mountain Lion Xcode version is 4.4.
You need to download and install the Command Line Tools for OSX Mountain Lion from Apple Developer (you'll need a Apple ID which is free to sign up for). This will install GCC (including g++) so you can build direct from Terminal
The exact package currently is Command Line Tools (OS X Mountain Lion) for Xcode - September 2012
Description about the package from Apple:
This package enables UNIX-style development via Terminal by installing command line developer tools, as well as Mac OS X SDK frameworks and headers. Many useful tools are included, such as the Apple LLVM compiler, linker, and Make. If you use Xcode, these tools are also embedded within the Xcode IDE, and can be installed on your system using the Downloads preferences pane within Xcode 4.5.
Note that when you run "g++" with Xcode 4.5 installed, you're picking up llvm-g++-4.2 (based on gcc 4.2.1) -- a provided, but no longer supported compiler on the platform. I'd strongly recommend using clang++ instead, the actively supported/developed compiler on the platform.
I want to compile a lib for arm architecture. Apparently Xcode has inserted a path "arm-apple-darwin11-llvm-g++-4.2".
Two Questions:
Where can I change this setting?
I only find the arm-apple-darwin10-llvm-g++-4.2 on my system, how can I update to arm-apple-darwin11-llvm-g++-4.2?
The XCode compiler can usually be selected by clicking your project and then selecting "Build Settings" and there under "Build Options".
Darwin11 is OS X Lion 10.7,
so when you want to upgrade the compiler, you will have to upgrade your OS and reinstall XCode.
Edit: As I just have seen, there seems to be no darwin11 variant for the arm compiler. There is only a i686 (and x86_64)-apple-darwin11 compiler.
Maybe the darwin11 for arm is in the next release? I don't know...but XCode 4.2.1(4D502) - the current production release - shouldn't be referring to an arm-apple-darwin11-llvm-g++-4.2 .
There is, however, a directory called arm-apple-darwin11 in the 10.7 SDK directories, but on my system (10.7.2 latest MBA, never had 10.6 installed on it) its empty.
apple darwin is the core of OSX, I think the easiest way (if not the only one) to get darwin 11 running is to upgrade your OSX to 10.7.1
edit: damn cli_hlt you're fast!