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

leledumbo leledumbo_cool at yahoo.co.id
Fri Aug 10 22:33:29 CEST 2018


> 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.

Sounds like my non-web hobby projects with Lazarus.

> 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 don't do that, though. Even if technically possible, there are hidden
stuffs you have to be aware of. main() is only a specification in C
standard, where the user code starts. However, long before that, there's a
startup mechanism specific to each implementation. In GCC, this is _start,
absolutely non-portable. That's why the IMO better way is to communicate
over pipes via TProcess.



--
Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/


More information about the Lazarus mailing list