Ever since I switched to Yosemite, I have been getting an Xcode quit unexpectedly error whenever I try to run SDL2. I can't even get a "hello world" to run.
I am trying the fix it by following the directions on this page:
Xcode 5 crashes when running an app with SDL 2
But I don't know how to "Compile the "Framework" target in Xcode/SDL/SDL.xcodeproj" I tried just simply building it but that doesn't seem to work because I don't see any framework file showing up.
Can someone help me figure out how to get rid of this error?
I assume you have got the latest version of the code either by doing hg clone http://hg.libsdl.org/SDL or by downloading the latest snapshot from https://www.libsdl.org/hg.php
This should give you a directory called SDL which contains the source and all of the projects. You will want to open 'Xcode/SDL/SDL.xcodeproj'
Then ensure the following is set as your build target - Framework > My Mac (64-bit) You can change it by clicking on it.
Then hit CMD+B (or select Product->Build from the menu) to build the framework. You will then be able to find the SDL2.framework in the following location:
/Users/*yourusername*/Library/Developer/Xcode/DerivedData/SDL2-*randomstring*/Build/Products/<*Debug/Release*>
Copy the framework to /Library/Frameworks
Related
TLDR;
I installed John Sundell's Publish according to the accepted practices and immediately get an error when I try to build my site package. How do I successfully install the product?
After cloning the publish package:
git clone https://github.com/JohnSundell/Publish.git
I cd'd into the Publish folder and ran:
make
which created an executable at /usr/local/bin/publish
I opened a new terminal window, created a directory using mkdir Saturday and then cd'd into that folder. I typed publish new and was successful:
✅ Generated website project for 'Saturday'
Run 'open Package.swift' to open it and start building
When I open the manifest file (Package.swift) and type cmd-S (Save) it imports all the necessary packages, and everything looks good to go.
When I type cmd-B (Build), however this error message comes up:
The package product 'CollectionConcurrencyKit' requires minimum platform version 13.0 for the iOS platform, but this target supports 11.0
When I look at the clone/install of Publish I see:
Computing version for https://github.com/johnsundell/collectionConcurrencyKit.git
Computed https://github.com/johnsundell/collectionConcurrencyKit.git at 0.1.0 (0.37s)
Notice it says version 0.1.0. In the generated package for my site, it retrieves version 0.2.0. I don't know if that's an issue.
But not one other Package.swift file in all the fetched dependencies mentions iOS.
I have this line in my Package.swift
platforms: [.macOS(.v12)],
So I know I haven't added this dependency on iOS inadvertently, so I don't understand the error message.
I'm running macOS Monterey 12.6 on Xcode 14.0 (14A309) - both are the most recent release versions available.
The hardware is: MacBook Pro (16-inch, 2021) using the Apple M1 Pro chip
If I'm leaving anything out, please comment and I'll provide more detail.
This is a slap your forehead 🤦🏽♂️ kind of thing here.
It turns out that when I opened the Package.swift it defaulted to an iOS scheme that I had just been using. I updated the scheme to a macOS based one, the problem went away. Now I understand the source of the iOS error. Apparently the two versions of ConcurrencyKit is a red herring.
Hope this helps others! Always check your target when compiling.
I've tried on 3 different computers but it still has the same problem that prevents me from running the project on the Mac. When I use Windows and connect to my Mac to run, it shows the same error on all 3 computers.
The error message displayed:
Can not resolve reference: /Library/Frameworks/Xamarim.iOS.framework/Versions/Current/lilb/mono/Xamarin.iOS/Facades/System.Memory.dll
Quick fix steps
VS on PC:
in iOS poject open References list
find Xamarin.iOS and check the path in properties
open containing folder, open Facades folder, copy System.Memory.dll
Mac:
open Finder and Go > Go to folder... > type Library
find:
Library/Frameworks/Xamarim.iOS.framework/Versions/Current/lilb/mono/Xamarin.iOS/Facades/
paste System.Memory.dll
.. rebuild and you are good to go
From what I understand, this is usually do to a pending update for Xcode.
Make sure Xcode is installed and updated. Once it is updated, launch Xcode to ensure that all updates are finished(I don't know why, but a lot of times you have to run Xcode for the update to finalize.)
Then clean and rebuild your project. That should fix the issue.
I am building the gomobile Hello example app, but am running into the following problem: When trying to build and run the app after opening it in Xcode (7.1), I get the error 'hello/Hello.h' file not found'
From what I can tell, Hello.h is in fact in the hello folder of the native directory.
Following this discussion on Github, it seems like this is due to a recent change in the way Xcode 7 updates paths for the headers.
The proposed solution is to check Copy items if needed when importing the framework:
I can confirm that this fixes the issue. But note that you would then need to re-import the framework every time you make changes and build the go code.
I'm on the latest beta version of Xcode (Xcode 4.5 with iOS 6.0). I've got an xcode project for an iphone app and I want to add a Unit Test target on it. I've followed carefully the instructions given on this page but I can't run the tests. Here's the message I read in the console:
Failed to find SDK: '6.0'
error: failed to attach to process ID 0
The target corresponding to the main application runs perfectly well on the iPhone 6.0 simulator though.
Where can I have made a mistake?
Xcode -> Preferences -> Locations -> Command Line Tools => Select the one matches with SDK.
EDIT:
EDIT 2: For some people, the above method works. If not, please try:
It seems that this issue was a result of switching between more than one version of SDKs, and could be solved by specifying the current SDK as the active one with a terminal command(, which requires root privilege):
$ sudo xcode-select --switch <path-to-your-current-xcode.app>
I found that in order to get Xcode to attach to my unit tests, I had to use LLDB, GDB did not work.
I returned to an earlier snapshot that I had - the only change being that the compiler was set to GDB instead of LLVM - and surprisingly enough that seems to have worked perfectly.
Not sure why LLVM isn't working though.
I've decided to make a Mac OSX port of my iOS app, so based on a number of suggestions I've received I've simply added a new Cocoa target to my iOS project, and set up a series of 'libraries' (which encapsulate the core business logic of my app) which I have added to the OSX target. I have not added all of the UIViewController code to the OSX target - I will have to rewrite the UI code, for obvious reasons. The app is building fine (no compiler errors for missing libraries, etc.), but for some reason I get the following error message when I try to run the 'hello world' program, which I'd like to get working before I start coding in earnest. Here's the message:
Error Starting Executable 'MyExecutableMac'
No executable file found.
Use "file" or "exec-file" command.
As per this SO question, I made sure that the proper executable file was listed under the scheme build settings, so that it will actually run. However it actually appears that the .app file is not being packaged properly - the .app file is stil listed as "red" in the file list, meaning the file is missing. What might be causing this error?
I had this problem in Xcode 4.2, I found that first doing a clean (Xcode > Product > Clean and option clicking Product > Clean Build Folder…) fixed it.