Hi there,
I have been building a few dlls for dbpro, just sort of trying to find out what is possible and what isn't for now. I'm using visual c++ 2008 express.
I thought it might be handy to be able to pass variables between dlls so i had a look around the internet and found __declspec ( dllexport ) and __declspec ( dllimport ).
Some sources say that you can export a variable from one dll and import it in another by using the above but i have not been able to make it work.
The dll that exports the variable compiles fine but the one that is supposed to import it does not, it gives the following error:
unresolved external symbol "__declspec(dllimport) int rog" (__imp_?rog@@3HA)
I have this in the exporting dll:
#define DLLEXPORT __declspec(dllexport)
DLLEXPORT int rog;
And i have this in the importing dll:
#define DLLIMPORT __declspec(dllimport)
DLLIMPORT int rog;
I only really started with this stuff so it's likely to be something obvious to those who know about these things.
Any comments would be much appreciated.
In the future we will not spank the monkey, the monkey will spank us.