Title: Re: [sword-devel] 1.5.3 on OSX

Ok. So now I have all that figured out. It seems that running "diatheke" doesn't work, but "./diatheke" works fine. Does this seem odd to anyone but me?

I also created a working C++ tool in Project Builder for the "lookup" application.

Need to reference the include/ folder.
Also add lib/.libs/libsword.a to the project (made a copy from the hidden directory).
Need to run "ranlib libsword.a" to set up the symbol TOC in the library before it will compile.
Linker option -lz seems to link in some standard zlib library - can add this in as a linker option or can add /usr/lib/libz.dylib to the project (which is in a hidden folder, just type /usr/lib in the Go to box).

Can move mods.d and modules under the build folder or just do a setenv on the command line:
setenv SWORD_PATH ~/development/sword/
which sets the environment only for that command line. But can then do a command like:
./lookup KJV "rev 10:1"

Instead you can add to the projects Executables, Env Vars tab. But need to do full path to the modules instead of user-folder relative. Can also set the args and Run - and it works!

--

Now for the challenging part. How to call the C++ based Sword API from Objective-C? Still just as a simple command line app called lookup. I really have no idea how to get this to work.

Once past this, I don't think there will be too much difficulty in doing a Mac OS X front-end with Cocoa. It'll just take some time. I've been reading "Cocoa Programming for Mac OS X" by Aaron Hillegass (very good book), and you can do a lot of stuff fairly easily in Cocoa. I'm not quite done the book yet, but unfortunately it doesn't cover such advanced topics as mixing C++ with Objective-C.

- n8

-- 
Nathan Youngman
E-mail: sword at nathany.com
Web: http://nathany.com




Reply via email to