x66u
asked on
exporting global from EXE to DLL?
Hi all,
I need to export a (dare I say) global variable from my EXE
to a DLL, but Visual Studio's linker seems to be blocking
this. Am I right in deducing that globals must be put
in a DLL and imported into DLLs and EXE from there? I am guessing
that the linker requires that info about the variable to be
in a .lib for it to be importable. In order to try the import,
I am using __declspec(dllimport) in the DLL, but the linker says it
assumes I really mean dllexport and is changing it to that,
then printing errors.
Thanks
I need to export a (dare I say) global variable from my EXE
to a DLL, but Visual Studio's linker seems to be blocking
this. Am I right in deducing that globals must be put
in a DLL and imported into DLLs and EXE from there? I am guessing
that the linker requires that info about the variable to be
in a .lib for it to be importable. In order to try the import,
I am using __declspec(dllimport) in the DLL, but the linker says it
assumes I really mean dllexport and is changing it to that,
then printing errors.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.