1. The code lives in a library
2. The library that it lives in does not include the main() function because that will be in the users code.
3. The users code in this case is wxWindows based and so the main() function isn't actually written by the user anyway, but this is a side-issue and I don't want the library to assume that the user is wxWindows-based
4. There is no main() function available for the user to customize. This means that there is no main() function, so how can the user store the argv[] somewhere?
6. But I need to have available for my part of code all the command line arguments
Some Ideas ?
On Thursday 15 Jan 2004 11:45 am, Vasko Tomanov wrote:
The code lives in a library
The library that it lives in does not include the main() function
because that will be in the users code.
- The users code in this case is wxWindows based and so the main()
function isn't actually written by the user anyway, but this is a side-issue and I don't want the library to assume that the user is wxWindows-based
- There is no main() function available for the user to customize. This
means that there is no main() function, so how can the user store the argv[] somewhere?
- But I need to have available for my part of code all the command line
arguments
Some Ideas ?
Maybe I am missing something but why not do what gtk does which is have an init routine in your library which the user calls first and to which argc and argv are passed?
Ian
Ship a library and an executable linked against the library. main() will only need to be in your executable.
Regards, Rob.
On 15 Jan 2004, at 11:45 am, Vasko Tomanov wrote:
The code lives in a library
The library that it lives in does not include the main() function
because that will be in the users code.
- The users code in this case is wxWindows based and so the main()
function isn't actually written by the user anyway, but this is a side-issue and I don't want the library to assume that the user is wxWindows-based
- There is no main() function available for the user to customize.
This means that there is no main() function, so how can the user store the argv[] somewhere?
- But I need to have available for my part of code all the command
line arguments
Some Ideas ?