What I need to know which part is compiled in Pascal and which part is comiled in C. lily.c appears to contain what I need, but it also clear than I don't need process_args and usage.
That file is the lily interpreter, if you only follow it, you only make the interpreter again, not really embedding it.
So in if I compile a pascal program what files and code do I have to add to it, in addition to the translated headers?
Depends on what you want to do, the API is big and undocumented. There are only two examples extending the core library, mod_lily and postgres, but none existent that actually embeds the library in another environment. You have to figure out yourself which functions to call to perform certain functionality.
I compiled the lily.c program quite easily for Windows and have it running, but how do create the lily.dll/so.?
Can you show me your example?
I showed you my gcc command. No idea if it directly applies to whatever C compiler for Windows you use, building shared library is not standardized among C compilers.
EDIT:
Found something that might put you off:
https://github.com/jesserayadkins/lily/issues/228Better use existing languages that already proven to work, Lua is damn small and just as powerful if not more powerful.