[sword-devel] 1.5.3 on OSX

Nathan Youngman sword-devel@crosswire.org
Sat, 30 Mar 2002 00:57:19 -0700


--Boundary_(ID_/4ZNMkgZUFrt5K9U7O1YIw)
Content-type: text/plain; charset=us-ascii; format=flowed
Content-transfer-encoding: 7BIT


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

--Boundary_(ID_/4ZNMkgZUFrt5K9U7O1YIw)
Content-type: text/html; charset=us-ascii
Content-transfer-encoding: 7BIT

<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
 --></style><title>Re: [sword-devel] 1.5.3 on OSX</title></head><body>
<div><br></div>
<div>Ok. So now I have all that figured out. It seems that
running<font face="Courier New" size="-3" color="#000000">
&quot;diatheke&quot;</font> doesn't work, but<font face="Courier New"
size="-3" color="#000000"> &quot;./diatheke&quot;</font> works fine.
Does this seem odd to anyone but me?</div>
<div><br></div>
<div>I also created a working C++ tool in Project Builder for the
&quot;lookup&quot; application.</div>
<div><br></div>
<div>Need to reference the include/ folder.</div>
<div>Also add lib/.libs/libsword.a to the project (made a copy from
the hidden directory).<br>
Need to run "ranlib libsword.a" to set up the symbol TOC in the
library before it will compile.<br>
</div>
<div>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).</div>
<div><br></div>
<div>Can move mods.d and modules under the build folder or just do a
setenv on the command line:</div>
<div>setenv SWORD_PATH ~/development/sword/<br>
which sets the environment only for that command line. But can then do
a command like:</div>
<div>./lookup KJV "rev 10:1"</div>
<div><br></div>
<div>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!</div>
<div><br></div>
<div>--</div>
<div><br></div>
<div>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.</div>
<div><br></div>
<div>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 &quot;Cocoa Programming for Mac OS X&quot; 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.</div>
<div><br></div>
<div>- n8</div>
<div><br></div>
<x-sigsep><pre>-- 
</pre></x-sigsep>
<div>Nathan Youngman<br>
E-mail: sword at nathany.com<br>
Web: http://nathany.com</div>
</body>
</html>

--Boundary_(ID_/4ZNMkgZUFrt5K9U7O1YIw)--