On Mon, Feb 22, 2010 at 02:33:34AM +0100, Uwe Stöhr wrote:
> Am 21.02.2010 19:41, schrieb Enrico Forestieri:
>
>>>> This breaks the compilation. I now get this error:
>>>>
>>>> Creating library release\lyx.lib and object release\lyx.exp
>>>> support.lib(os.obj) : error LNK2019: unresolved external symbol
>>>> "__declspec(dllimport) public: static class QString __cdecl
>>>> QString::fromWCharArray(wchar_t const *,int)"
>>>> (__imp_?fromwcharar...@qstring@@sa?...@pb_wh@Z) referenced in
>>>> function "class QString const __cdecl
>>>> lyx::support::os::get_long_path(class QString const&)"
>>>> (?get_long_p...@os@supp...@lyx@@YA?BVQString@@ABV4@@Z)
>>>> release\lyx.exe : fatal error LNK1120: 1 unresolved externals
>>>> scons: *** [release\lyx.exe] Error 1120
>>>>
>>>> CAn you please have a look?
>>>
>>> It compiles fine with MinGW. However, I get a different error when the
>>> NewAPIs.h include is available. Does the attached patch solve the problem
>>> for you?
>
> No.
> The above error message states that
> QString::fromWCharArray(wchar_t const *,int)
> is the problem.
> I don't understand the error message but it seems that fromWCharArray 
> needs to be linked via a header file.

That header file is <QString>, which is already included. There, you
can find the declaration:

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?

-- 
Enrico

Reply via email to