bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] awk extension in c++


From: david kerns
Subject: Re: [bug-gawk] awk extension in c++
Date: Thu, 5 Nov 2015 06:45:32 -0700

A lot of my issues have been self inflicted :(
I started with a .cc and .h file that builds fine outside of gawk.
I'm running CentOS 6.7, and I started with gawk 4.1.3 source, added my .cc file in the extensions dir (copy/mod of time.c since it was close to my intent), and then just copy/pasted in the Makefile.{am,in}  to add my .cc... then hit autoconf 2.69 required.
So then I grabbed awk 3.1.7 source (that matches my OS version) ... ugh extensions have had a lot of work done since then.

... found a CentOS 7.1 machine, (that's bleeding edge for my group), copied in my changes, which required automake-1.15 ... (wow, I thought autotools had been stable for years!?)

so then I grabbed awk 4.0.2 source (to match my OS version) .. extensions is still build via script, and the API still significantly different.

so I decided to go a different route, (perhaps this should have been my first path) ... I wrote a .c wrapper that interfaces to my .cc file then built a .so library that successfully links with a main.c ... so I think I'll go back to the 4.1.3 source and write a script to compile/link my lib modified .c extension with my (.cc)->.so library. maybe even just add my functions into time.c, since they are time related. ... I'd really like to use 4.1.3 even on CentOS 6.7
    

On Wed, Nov 4, 2015 at 8:55 PM, Aharon Robbins <address@hidden> wrote:
Hi.

Sorry the delay in replying.  Can you describe what you've tried to do
to build your extension and what's not working?  There are instructions
in the manual on compiling, and using the autotools should not strictly
be necessary if you're using GCC and GNU Make.

Otherwise, you can look at the configure.ac in the extensions/ directory
of the gawk dist for some hints. :-)

I think you're the first person to try to write an extension in C++ (as
opposed to C); I will be interested to hear your experiences.

Thanks,

Arnold

> Date: Sun, 1 Nov 2015 16:40:44 -0700
> From: david kerns <address@hidden>
> To: address@hidden
> Subject: [bug-gawk] awk extension in c++
>
> I'm trying to write a new extension that makes use of a C++ class, thus, I
> need to use g++ to compile it, but I'm enough of an autotools noob, that
> I'm not able to get it working.
>
> Can anyone provide an example or other helpful input?
>
> thanks


reply via email to

[Prev in Thread] Current Thread [Next in Thread]