So for the past couple of days I’ve been trying to get a Hello, World! program to run using C++ in Eclipse Juno on my MacBook Pro running OS X 10.8.3. After getting the project to build in Eclipse and getting a successful compile, I kept getting the following error when running the executable: “cannot execute binary file”. The binary file also was being shown in the Project Explorer in Eclipse with a puzzle piece icon, rather than the executable “play” icon. As it turns out, by default Eclipse will set up the project to generate a shared Library rather than an executable, or so it seems. To fix the issue, go into the project properties and under MacOS X C++ Linker, uncheck Shared (-dynamiclib) in the Shared Library Settings sub section. Apply the changes, run a build and presto!
This solution is all thanks to this post. I’m just reposting the solution to firstly help remind myself of what to do and secondly in hopes that the reposting will help someone else find the solution faster than I did.
As far as I can tell, OpenGL had little to do with the problem, but since I noticed the problem after trying to run an OpenGL project, I thought it valuable to tag it.
For those who don’t like to read: the fix.
I upgraded to Snow Leopard (OS X 10.6) from Leopard (OS X 10.5) last week and everything seemed to go off without a hitch, until…
I have a bluetooth, wireless, keyboard that I use for work. At some point in the past week, not initially, my keyboard started acting up. At first I didn’t think anything of it because the lady’s computer is also paired with the same keyboard and when the problem first occurred it was because the keyboard was connected to her computer, also on Snow Leopard, rather than mine. I ended up removing the keyboard from her bluetooth setup and re-pairing (no pun intended) the keyboard to my computer. Everything worked fine and I went through my day.
The next day, I found that my keyboard would not pair up again. WTF!? So I go through the process again, thinking maybe Laura and I did a keyboard swap or something and that was the problem. Re-paired, everything’s cool. Whatever. If it happens again, I’ll deal with it.
Finally, today, day 3, I start up my computer and the keyboard won’t connect. Immediately I try to re-pair the keyboard and suddenly the computer tells me there must be some compatibility issue. Thanks Apple. I have an Apple keyboard I’m using with an Apple Macbook Pro and I have a f***ing compatibility issue. You’d think they would make sure that bluetooth continued to work between upgrading from Leopard to Snow Leopard. Oh well.
So I resort to Google. And basically what I find is that I have to reset my System Management Controller (SMC). Do I know what an SMC is? No. Do I care? Not really… okay, so I do a little. Apparently the SMC handles a lot of the lower level operations performed by the computer like “the power button”. Sweet Apple. Okay, so what to do. You have to reset the SMC. To do this follow the steps specified here. Be sure to read through the process and select the procedure that matches your computer. Different laptops, desktops, etc. will have a different method for resetting the SMC.
All in all, it’s disappointing that Apple overlooked this issue. Seems too often that companies can be aware of an issue be keep it quiet for the majority of users that don’t use (in this case) bluetooth, while those that due have to spend have their day in frustration.
Dear Apple,
Don’t pull Quit pulling a Microsoft.
Your Friend,
Mr. Customer
I’ve had a Wacom Bamboo Pen Tablet for the past year or so and love it. It’s hard to imagine going through my workday using a mouse now. However, I’ve found that from time to time the driver for my Wacom will fail when I login to my user account on OS X 10.5. Usually OS X asks if I’d like to relaunch the driver and everything is dandy, so I haven’t had to really do much anything about it; that is until today.
Today, I booted up my computer and my tablet driver failed and “relaunching” the driver didn’t help at all. I figured Apple must have made an update that conflicted with the Wacom driver, leaving me to reinstall the latest driver, which I downloaded from Wacom here. Unfortunately I found reinstalling the driver did no good. I restarted. Uninstalled the driver. Reinstalled the driver. Restarted. Nothing. Same problem over and over; once I login the driver fails and when I go to my preferences pane it tells me that it is unable to find my USB tablet. Unplug USB. Reboot. Plug in USB. Nothing.
Eventually I was able to discover that while the new driver did not seem to work for my user account, it worked fine on my login screen and for my “admin” account. So at least I knew the problem was specific to my user configuration. Now, armed with this information and Google I was really able to get to the root of the problem with the help of this post by someone going by the handle rausch over a year ago.
Quick Answer
When uninstalling (which should be done before reinstalling) the pen tablet driver, the Wacom uninstall script fails to remove a few key files located in the ~/Library/Preferences/ directory:
com.wacom.pentablet.p.TMP
com.wacom.pentablet.prefs
com.wacom.tabletpreferences
com.wacom.wacomtablet.prefs
To fix the driver from failing, uninstall the driver — do this by holding down open-apple and clicking on the icon in the preferences pane. Then delete any of the above files that still exist in your ~/Library/Preferences directory — where “~” is your user directory (OS X recognizes this syntax). In my case I only need to delete two of the above files as they were the only two of the four still present in my ~/Library/Preferences directory. Reinstall the driver and with any luck, your tablet will function properly again. Keep in mind, this will reset your tablet preferences back to the default settings.
Thank you rausch, whoever you are. And I hope that by republishing these instructions, someone else will be able find a solution to their problem faster that I did.
Today I was messing around with the built in Apache server on my Mac. What I was doing seemed simple enough; start my apache server with Web Sharing turned off in my system preferences. So I turned off Web Sharing and went for my Terminal, entering:
apachectl graceful
Expecting Apache to restart/start I was surprised to get this error:
launchctl: CFURLWriteDataAndPropertiesToResource( /System/Library/LaunchDaemons/org.apache.httpd.plist) failed: -10
After searching around online for a bit I realized that my problem was I failed to enter the command as root (or I forgot to put sudo in front of my command.
With a second attempt I entered:
sudo apachectl graceful
And vuala, apache is on. No errors. However, now when I enter:
sudo apachectl status
I get this error:
/usr/sbin/apachectl: line 106: lynx: command not found
Not sure what that’s about. If anyone’s got any ideas, I’d appreciate it.