Re: Using 4gl from inside python

Mike Aubury <[email protected]>
Newsgroups gmane.comp.lang.4gl.aubit.general
Message-ID <CAGAq4WH5CGjxdqJYyoxQoMcw-JNmM27muPvhmdTFBOM51TEOcA@mail.gmail.com>
I've not done it before - but I'm guessing to call a 4gl function you'd
need:

1) Call the initialization stuff that normally happens in the "MAIN" of a
compiled program before calling any functions
              A4GL_fgl_start(argc,argv)
for example

2) Ensure you load the libaubit4gl.so library into python

3) Compile the 4gl with "4glpc --as-dll" to a shared library..








On Fri, 9 Aug 2019 at 09:31, Joao Granado <[email protected]> wrote:

> Hi All,
>
> I am trying to use 4gl from inside python.
> The host is ubuntu 16.04.
> On the end I would like to be able to do this from python:
>
> import spam
> spam.system("ls")  # calling a c function, this work fine
> spam.say("hello") # calling a 4gl function. This issues an error
>
> I build on an example from python3 documentation called spammify.
> The c module taken from there was adapted putting the c code betwen code
> endcode
> and adding a 4gl function say(phrase).
>
> The call to spam.system("ls") is at the end a call to a c function and
> works fine. It is literally taken from the python documentation.
>
> But when executing spam.say("hello")  an error occurs:
>
> Error: can't open DLL
> /infortrans/aubit4gl/aubit4glbin/plugins-1.5_1/libUI_TUI.so - STOP
> Error msg: /infortrans/aubit4gl/aubit4glbin/plugins-1.5_1/libUI_TUI.so:
> undefined symbol: abort_pressed
> Cannot open DLL
>
> say(phrase) function only does a  'display phrase'.
>
> I would be obliged for some hint on this
>
> Thanks
> Joao Granado
>
>
>
> _______________________________________________
> Aubit4gl-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss
>

_______________________________________________
Aubit4gl-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.