I started my journey into the darkness that is "externals" with a naive question about using commands contained in a .dylib file (perhaps the mac .dll file) see http://forums.runrev.com/viewtopic.php?f=7&t=11419, I had hoped that it would be simple to use the routines contained inside the file. However, it is not.
It seems that I need to create a Livecode External file that acts as a wrapper for the commands that I wish to use. So I need to learn how to do this. First I watched some video recorded at RunRev09 where the speaker explains how the "new" externals API works and is so much simpler than the old externals API. This new API will be released at the "end of the month - 2009). Unfortunately this new API has not been released, but hey ho these things happen.
Next I turned to the tutorial "Externals 1". This tutorial is written against RunRev 2.6 (thats not a misprint v2.6) and while it does a good job of hand holding the new user of Xcode (me) it seems doomed to failure: As Elizabeth points out in her post along the same lines as this one (http://forums.runrev.com/viewtopic.php?f=17&t=11223) The #includes are blank when I think they should read
Code: Select all
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <revolution/external.h>
Code: Select all
#include <revolution/external.h>
When I select build the following error is posted : "error: There is no SDK with the name or path 'Developer/SDKs/MacOSX10.4u.sdk" which I think is part of libexternal, and I have to agree with xcode as 10.4u is not on my machine (I have 10.5 and 10.6 on my machine without the "u"). Now I'm sure that I will be able to dig around inside libexternal and point to 10.6 but I don't think that I should have to.
The general state of "externals" surprises me: other high level languages seem to be able to use 3rd party libraries without all this hoopla. If we are stuck with writing wrappers then the documentation needs be updated to a state where the naive user such as myself has a chance. Also why are isn't there a collection of "wrappers" already produced if only to act as a guide for people like me. My project involves attempting to communicate and send commands to a FTDI USB device. The ability to communicate with these devices would be a powerful addition to Livecode yet it seems that these two Scottish companies have yet to meet (FTDI are based in Glasgow).
Can anyone point me to a working tutorial or other documentation that shows how to create a wrapper?
Sorry for the rant - but I have spent two days failing to create a "helloworld" application....
Simon