|
From: Michael G. <mg...@te...> - 2005-10-29 17:06:35
|
> 1) If I have global variables in a DLL (ie. the DLL is not stateless) > and several applications make use of the DLL simultaneously, do they > operate on the same data or has each application an own instance of > the DLL's global data? I hope the latter is the case. Each application has it's own local copy. You have to use shared memory if you wish to share data among applications (or whatever other means you prefer). > 2) On GNU/Linux, I have one project where one shared object refers back > to symbols of the main application. When linking that .so file with > gcc -shared, that's no problem. When linking the main application, > the library is given on the command line with the -L/-l switches and > linking works. The undefined references from the .so are resolved > using the main application. >=20 > Now, when trying to build the same on Windows (using gcc -shared as > well), the DLL doesn't even build but throws errors of "undefined > references". I want those to get resolved when linking against the > main application. Is such a set-up not possible on Windows? It is possible. I no longer remember the details but earlier this year there had been a discussion on dynamic linking which also dealt with this very problem (and presented a solution). Best, Michael =2D-=20 Vote against SPAM - see http://www.politik-digital.de/spam/ Michael Gerdau email: mg...@te... GPG-keys available on request or at public keyserver |