Hi,
This is on an AS/400 which can be a little strange but I think the
basic question is portable.
I have a (non-C) program that needs to make series of calls
to some C programs/functions. The problem is that I need to
initialise certain variables within the first C program called and
then use them in subsequent calls to other C functions.
I have done exactly this using COBOL subprograms by specifying the
EXTERNAL keyword after rmy global variables. This works as long as the
COBOL program executes in the same thread as the main program, which I
can control on the AS/400.
C seems to behave differently in that I only seem to be able to share
variables if all of my C functions are linked together - which makes
it difficult to call them individually from my main program.
How can I reference extern or global variables from different C
functions which haven't been linked together into a single binary?
Any and all comments would be greatly appreciated.
Cheers,
Paul
--
comp.lang.c.moderated - moderation address: cl**@plethora.net