On Mon, Feb 22, 2010 at 03:58:26PM +0100, Vincent van Ravesteijn - TNW wrote:
>
> >> >class Q_CORE_EXPORT QString
> >> >{
> >> > ...
> >> > static QString fromWCharArray(const wchar_t *, int size = -1);
> >> > ...
> >> >}
> >> >
> >> >so, I really don't understand why you get the error. Are you sure
> you
> >> are
> >> >linking the QtCore library?
> >> >
> >>
> >> I see the same, and I don't know what the problem is either. The
> >> QString header can be found, Qstring can be used, just not this
> static function.
> >> Maybe it is not exported or something..
> >
> >I think it may be a case of calling conventions mismatch.
> >
>
> Could it be that we are missing an include or we are including a
> different include that makes wchar_t to be defined differently (or to be
> typedef'd differently) ?
No, calling conventions pertain to functions, not types. I don't have
MSVC so I can't check it, but at the URL I posted earlier I see that
there is a specific compiler option for requesting a particular calling
convention. It is /Gd for the cdecl convention, and /Gz for stdcall.
You should check what flag is used for compiling the Qt sources and
what flag is used for compiling os_win32.cpp (I think the problem is with
this file only, otherwise you would have noticed earlier the mismatch).
--
Enrico