Thanks for your expertise Arved, I could sure use it (and I am sure other out in the Perl world could to.) I will use your suggestions and give it a shot. I think its great that a you are putting a book out on SWIG (actually, for my own Mac purposes, I am happy to hear that MacSWIG exists) Is MacSWIG part of the MacPerl distribution or can I download it from somewhere? Carlos P.S. Since SWIG involves compiling the header files, can I user MPW and it's associated compilers or should I get MetroWorks? ______________________________________________________________________ C.F. Velasquez Asst. Vice President Global Database and Technology Division Salomon Smith Barney, Inc. > -----Original Message----- > From: Arved_37@chebucto.ns.ca [SMTP:Arved_37@chebucto.ns.ca] > Sent: Friday, July 02, 1999 8:14 AM > To: Velasquez, Carlos; 'macperl@macperl.org' > Subject: Re: [MacPerl]How to access C/C++ routines.. > > Hi, Carlos > > Based on your criteria of "quick to implement", I suggest using SWIG. > > SWIG handles structs (and also 'typedef struct') as a matter of course, > and you can also have it set up struct constructors (nothing to do with > C++). I'm not sure about the unions - I'll play with this a bit and post > the results. Worst comes to worst, this might be the one thing where you > have to do some unavoidable work setting up a new SWIG typemap. > > Using XS on Unix isn't much worse, but unfortunately you would have to > do *all* of the work concerning struct translations yourself. > > Your library is on Solaris, I think you said, so you'd want to do the > final > stuff on Unix, but if you want to experiment with SWIG on your Mac, just > download MacSWIG. The functionality of MacSWIG is exactly the same as > Unix SWIG - same output for same input. I suggest extracting one function > from ESSAPI.H, along with the structs that it uses, putting them in a SWIG > ".i" file, and running SWIG on them. Just to see what it does. > > SWIG comes with a well-written batch of docs in PDF, so you'll likely be > able to produce a Perl wrapper to look at in only a few hours from the > time of download. > > For MacPerl folks in general: I'm going to have a short tutorial on using > MacSWIG for MacPerl (i.e. getting from MacSWIG output to a working > extension) in a few weeks, but if you want to get a jump, you can > basically > take a build procedure from my Mac_XS tutorial, ignore the xsubpp .xs->.c > part, and just put in the C wrapper file produced by SWIG instead. MacSWIG > itself is exceptionally easy to use. > > Arved > > > --------------------------------------------------------------- > This mail was sent through the Nova Scotia Provincial Server. > http://nsaccess.ns.ca/mail/ (in development) ===== Want to unsubscribe from this list? ===== Send mail with body "unsubscribe" to macperl-request@macperl.org