简体   繁体   中英

What are the dependencies of a FreePascal GUI app written with Lazarus?

I know that FreePascal apps for Linux are statically linked. I imagine that there are some low-level APIs required. Is this just GTK for GUI applications? I assume a command-line app wouldn't have the same dependencies.

Where can I find a way to determine which LCL classes require which underlying APIs?

Edit: Vitaly wanted to know what I found with his answer.

With a small console app: ldd confirmed that it was a statically linked executable.
strace was more interesting. A console-only application showed no open files. I guess it's totally self contained.

With a simple GUI application, ldd showed some dynamic linking, and strace's output showed many "open"s.

It'll still take a little more research before I'm comfortable with this.

Since they are statically linked, exactly what kind of dependencies could they have?..

However you can try to work it out with a several methods...

  1. ldd <executable> (just to be sure that your binary is not dynamically linked)
  2. strace <executable> > log.file 2&>1 && cat log.file | grep open

Where can I find a way to determine which LCL classes require which underlying APIs?

From my point of view, this purpose requires some hard work. I'd advice to try systemtap for the one.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM