svkr2k
July 12th, 2005, 12:16 AM
Dear forum members,
I have an unmanaged dll written in C++ using Visual Studio 6.0. I need to use this dll in an VC++ .Net application. The unmanaged dll has a class called CUnmanaged. Its constructor accepts reference to ostream object:
CUnmanaged::CUnmanaged( ostream& os )
{
/* ... */
}
In the VC++.Net client application, the object of CUnmanaged is created as follows:
filebuf fb;
fb.open ("c:\\test1.txt",ios:: out);
ostream os(&fb);
os << "Test sentence\n";
CUnmanaged objUnmanmaged( os );
fb.close();
When linking, I get the following error:
error LNK2001: unresolved external symbol "public: __thiscall CUnmanaged::CUnmanaged(class std::basic_ostream<char,struct std::char_traits<char> > &)" (??CUnmanaged@@$$FQAE@AAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z)
Can anyone suggest some solution for this ?
Thanks in advance.
-Rajesh.
I have an unmanaged dll written in C++ using Visual Studio 6.0. I need to use this dll in an VC++ .Net application. The unmanaged dll has a class called CUnmanaged. Its constructor accepts reference to ostream object:
CUnmanaged::CUnmanaged( ostream& os )
{
/* ... */
}
In the VC++.Net client application, the object of CUnmanaged is created as follows:
filebuf fb;
fb.open ("c:\\test1.txt",ios:: out);
ostream os(&fb);
os << "Test sentence\n";
CUnmanaged objUnmanmaged( os );
fb.close();
When linking, I get the following error:
error LNK2001: unresolved external symbol "public: __thiscall CUnmanaged::CUnmanaged(class std::basic_ostream<char,struct std::char_traits<char> > &)" (??CUnmanaged@@$$FQAE@AAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z)
Can anyone suggest some solution for this ?
Thanks in advance.
-Rajesh.