简体   繁体   中英

Command line program invoked as a “slave” considered dynamically linked?

I'm trying to get clarification on exactly what dynamically linked means. I understand if my program links to a separate .dll and makes function calls at run time, that's dynamically linked. But say my program invokes a separate .exe via command line. That .exe can act as a slave by passing "-slave" in the command line and a handle to a window in my app which it communicates to. My program then sends it commands, for example: -dothis or -dothat and the output is sent to my program's window. Is that considered dynamically linked?

I ask because the .exe I'm using via command line is an open-source GPL program and my program is not. My understanding is that if I don't actually link to any GPL libraries, I'm not in violation of the license.

Thanks

Is that considered dynamically linked?

No. You are dynamically linking to another program only if you load its code in your own process's address space.

Your suggested solution of running the GPLed program as a separate process and then communicating with it using standard IPC facilities is exactly how this problem is solved in the field.

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