[fpc-pascal]XChat plugins using FPC

James Mills prologic at daisy.ods.org
Wed Jul 23 09:30:51 CEST 2003


On Wed, Jul 23, 2003 at 08:50:35AM +0200, Michael Van Canneyt wrote:
> 
> 
> On Wed, 23 Jul 2003, James Mills wrote:
> 
> > On Wed, Jul 23, 2003 at 03:28:55AM +0200, Marco van de Voort wrote:
> > > > I can successully compile and test the plugin source listed at
> > > > http://xchat.org/docs/plugin20.html written in C.
> > > >
> > > > However I don't like C much and am wondering if it's possible to do the
> > > > same thing in pascal... ? I know it has to be possible, but I need
> > > > someone to start me off in the right direction...
> > >
> > > Probably yes, but you'll need to convert headers of xchat-plugin.h. The
> > > "h2pas" util can be handy for this. (or at least it can save a lot of time)
> >
> > Okay I've converted the headers (step 1) :P
> >
> > $ h2pas -S -D -p -l xchat xchat-plugin.h
> > at line 6 error : syntax error
> > Illegal character in line 6
> > "#define XCHAT_IFACE_VERSION    ((XCHAT_IFACE_MAJOR * 10000) + \"
> > at line 7 error : syntax error
> > Illegal character in line 7
> > "                                (XCHAT_IFACE_MINOR * 100) + \"
> >
> >
> >
> > What do I do with these errors though ?
> 
> run the file through the gcc preprocessor:
> 
> gcc -E xchat-plugin.h -o xchat-plugin.hp
> h2pas -S -D -p -l xchat xchat-plugin.hp
> 
> Note that this destroys all '#define'  constants, so you'll have to
> run h2pas a second time to get all constants.

Okay, I'll try that :)

I tried fixing the header file, but obviously you know what to do better
than i :P

cheers
James

> 
> Michael.
> 
> 
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal

-- 
-
- James Mills
Zero Defect Software Engineers Group - ZDSEG




More information about the fpc-pascal mailing list