[Lazarus] Building a C (or possibly C++) program into a Lazarus app

R0b0t1 r030t1 at gmail.com
Fri Aug 10 17:10:54 CEST 2018


I have some posts on the forum asking about similar questions. I was
told FPC object files will link just fine with GNU tools, so you
should be able to.

To me it seemed it would be easier to keep the codebase in C++ but
then call into the LCL. Sadly that is quite a bit off.

On Fri, Aug 10, 2018 at 9:44 AM, Mark Morgan Lloyd via Lazarus
<lazarus at lists.lazarus-ide.org> wrote:
> Is it possible to link a C or possibly C++ program into a Lazarus one by
> simply calling its main() function? Has anybody actually done this?
>
> I've got a couple of C/C++ programs which are based on stdin/stdout user
> interaction (no curses etc.) but have thoroughly unpleasant keyboard
> requirements and odd output encoding. I find myself wondering whether they
> could be given a more friendly frontend by wrapping them in a Lazarus app,
> with an on-screen keyboard similar to what's found on a tablet etc.
>
> I would, obviously, be able to rename main() if necessary, as well as I/O
> functions.
>
> --
> Mark Morgan Lloyd
> markMLl .AT. telemetry.co .DOT. uk
>
> [Opinions above are the author's, not those of his employers or colleagues]
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus-ide.org
> https://lists.lazarus-ide.org/listinfo/lazarus


More information about the Lazarus mailing list