Home » U++ Library support » U++ Core » Public access to Argv0__[]
Public access to Argv0__[] [message #56628] |
Mon, 29 March 2021 21:48  |
Novo
Messages: 1430 Registered: December 2006
|
Ultimate Contributor |
|
|
Is it possible to make extern char Argv0__[] publicly visible?
I need it to initialize third-party code in a way similar to the way gtk_init is doing this.
TIA
Regards,
Novo
|
|
|
|
Re: Public access to Argv0__[] [message #56675 is a reply to message #56669] |
Fri, 02 April 2021 15:22   |
Novo
Messages: 1430 Registered: December 2006
|
Ultimate Contributor |
|
|
mirek wrote on Fri, 02 April 2021 03:48
Something like
String GetArgv0();
Yes. Exactly.
mirek wrote on Fri, 02 April 2021 03:48
(things are complicated as Argv0 is POSIX specific...)
It is coming from main(int argc, char **argv) ...
A note from the API that I'm using:
Special consideration is required for argv[0]. On Unix, this argument passes the part of the command line that is used to locate the executable. Prolog uses this to find the file holding the running executable. The Windows version uses this to find a module of the running executable. If the specified module cannot be found, it tries the module libswipl.dll, containing the Prolog runtime kernel.
Regards,
Novo
|
|
|
|
|
Goto Forum:
Current Time: Sat Apr 26 09:48:14 CEST 2025
Total time taken to generate the page: 0.02036 seconds
|