Hello friends,
I am facing a linking problem in VC++8.0 compiler.
Suppose I have a library, say A.dll.
In this library I have a file, say x.cpp. Within this file there is a extern const variable, like
.....
__declspec( dllexport ) extern const long ERROR = 100;
.....
Now I am trying to access that constant from another library, say B.dll.
...
extern const long ERROR;
...
void ABC::func()
{
std::cout<<ERROR;
}
...
Now whenever I am trying to build B.dll I am getting a linking error like
ABC.obj : error LNK2019: unresolved external symbol "long const ERROR" ....
I have already linked A.lib in the makefile to generate B.dll
Pls help me to fix the problem.
Thanx,
Amit