How I like to code

Tag Archives: Xcode

Building OpenCV as a macOS Universal Intel Binary

So, for my project, I needed an Intel Universal build of the OpenCV library. The copy of the OpenCV source I have on my machine is version 3.0.0 and it has worked well for me, so I’ll start with that. My build machine is running macOS 10.12 and has Xcode 8 installed on it. OpenCV […]

Xcode plugin for Perforce

I use Perforce as my version control system and Xcode as my IDE. Unfortunately, Apple removed Perforce support from Xcode a whiles back for reasons unknown. So, to work around the problem, I started to use of DTerm… but I wanted more. I created AppleScripts for both Xcode4 and Xcode5 which was better, but… I […]

Xcode dylib constructor destructor

I meant to post this link a while ago, but here it is anyway: TP40002013-SW17 So, in a dylib, you can have code execute when the dylib is loaded and execute code when the dylib is being unloaded: ?View Code C__attribute__((constructor)) static void initializer1() { printf("[%s] [%s]\n", __FILE__, __FUNCTION__); }   __attribute__((constructor)) static void initializer2() […]

openframeworks plugin for Xcode

Sweet! Now you can add open frameworks add ons to your project from a Xcode plugin: https://github.com/admsyn/OFPlugin Of course, if you have Alcatraz, you won’t need to go to the github site to download the plugin, just get it from “Package Manager” within Xcode

You can run Swift code from the command line?

WAT? Now this is something else! practicalswift.com

A package manager for Xcode named Alcatraz

I learned about a package manager for Xcode named Alcatraz when I attended CocoaConf in San Jose earlier this year. Extending the functionality of Xcode through plugins has been something I’ve been looking into for a while and the only plugins I knew about in the wild could only be found through Google searches or […]

And now, another language

You know, I was getting quite comfortable with Obj-C, C++11, and everything else I had learned over the years… now Apple has to go and introduce another language: Swift I don’t know what to make of it. How much better can it be than Obj-C? I guess I’ll find out over the course of the […]

Perforce and Xcode5

In a previous post, Perforce and Xcode4, I created applescripts to work with Xcode4 and Perforce. I updated the AppleScripts to work with Xcode5 only and added a couple of new scripts. One, called p4_file_renamed.scpt, is used to update the renamed file Perforce when you are using Xcodes rename functionality, either directly or through the […]

Perforce and Xcode4

I created some AppleScripts that allow you to control some basic Perforce functionality in Xcode4, which was lost when Apple released the latest version of their IDE. Perforce actually published a way of checking out files using the Behaviors functionality in Xcode (Xcode and P4), but I wanted a little more. Note, these scripts are […]

A note about performance

On a multi-core Mac, running 10.8, I ran a test to compare the speed differences of incrementing or decrementing a value with no-locks, atomics and finally, a mutex lock. The no-lock is the baseline, and here is the difference in speed with the later 2 items: Atomics: 3X slower on the same thread Mutex: 7X […]