I am using Visual C++ 2005 to create an XPCOM component. I am facing
the following error.
error LNK2001: unresolved external symbol "__declspec(dllimport)
public: int __thiscall nsOutputStream::write(void const
*,int)" (__imp_?write@nsOutputStream@@QAEHPBXH@Z)
I believe that the error occurs when it run the following code:
char *s = PR_smprintf("xxxx");
PRInt32 L;
L = strlen(s);
//mStream is a variable of nsOutputFileStream.
if (PRInt32(mStream->write(s,L)) < L) {
return NS_ERROR_FAILURE;
}
Does any one know what is the problem with this error. Thanks in
advance.
Regards
LKY
This is really a build problem.
> error LNK2001: unresolved external symbol "__declspec(dllimport)
> public: int __thiscall nsOutputStream::write(void const
> *,int)" (__imp_?write@nsOutputStream@@QAEHPBXH@Z)
Looks like a linking problem... With which libraries are you linking?
[ Rest of post included for those who do not read m.d.a.t ]
Hi,
Thanks for reply. I am using Gecko SDK 1.8. Is this the libraries that
you mean?
Regards
LKY
PM
Hi,
Thanks for reply. I am using Frozen linkage (dependent glue). For
Windows one.
regards
LKY