dear all,
I'm facing a problem with linking of a dll( prepared in vs 2005 ), with the vc 6.0.
Here are the details,
I have some funcions defined in a win32 dll project (vs 2005).
it looks like :
int __declspec(dllexport) login(string userId, string passwd)
{
//code goes here
}
when I build the project it generates a dll, a lib and a def file.
when I use the lib (put in settings>link>input additional libs), and putting the .dll in the current directory, I'm getting the linker error as unresolved symbol _login@48, where as the lib file contains the symbol as _login@96.

linking problems in vc 6.0 and vs2005
JPNMN
hansv
Gold333
Please show us the complete error message you get.
Also you should know that passing STL objects through the stack from one module to anothr requires:
1. Usage of the same CRT linked as DLL
2. Reqires the exact same version of the STL and compiler.
I would never try to pass those complex objects like the STL objects through an DLL interface unless I am sure that DLL and EXE are a fixced unit and never updated or compiled seperately.
Just my 2 cents
Piotr Smolanski
Thank you Alex,but we tried extern "C" as well.
Thank you Martin, but I would like to know why shouldn't I pass the STL objects as arguments. Even when I specify the extern "C" to avoid name mangling, why the function us actually getting mangled .
From the answer can I draw that, c++ libraries generated with one compiler can't be used in another c++. (i.e. c++ lib generated using gcc, can't be used with vc++ compiler ), please clarify me.
Thanks,
Pratap.