Bit by a linker issue

Apple has some great code to handle adding and removing items as login items called LoginItemsAE which uses AppleEvents to talk to System Preferences. I’ve used it on a number of projects and found it to work well. That was until today. A client complained that my install code wasn’t working that added it as a login item. I couldn’t reproduce this on my Mac Mini (Intel) and I use the same piece of code in another app in the same bundle and it worked fine. After a bit of fighting with the system and remembering that sometimes Carbon framework needs to be linked, I linked it in and the problem went away. Why, oh why, didn’t I get a linker error?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.