PDA

View Full Version : building qtwebkit with visual studio 2008



boie
17th October 2010, 02:20
Hello everyone,

I'm trying to build qtwebkit that came packaged with qt (opensource) 4.7.0 on visual studio 2008. after going through several issues which have been resolved, I finally am able to get to the linking step but it is reporting several unresolved externals with the qchar class. This seems like such odd errors that I was hoping maybe someone could provide some insight. I read that it might be visual studio treating wchar_t as a built-in type but when I toggle this flag (-Zc) it doesn't seem to affect anything.

Here are the messages:

1>AuthenticationChallengeBase.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned int __cdecl QChar::toCaseFolded(unsigned int)" (__imp_?toCaseFolded@QChar@@SAII@Z)

1>jscore.lib(JSGlobalObjectFunctions.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static enum QChar::Category __cdecl QChar::category(unsigned int)" (__imp_?category@QChar@@SA?AW4Category@1@I@Z)


1>StringImpl.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static enum QChar::Direction __cdecl QChar::direction(unsigned int)" (__imp_?direction@QChar@@SA?AW4Direction@1@I@Z) referenced in function "private: void __thiscall WTF::CrossThreadRefCounted<class WTF::OwnFastMallocPtr<wchar_t const > >::threadSafeDeref(void)" (?threadSafeDeref@?$CrossThreadRefCounted@V?$OwnFa stMallocPtr@$$CB_W@WTF@@@WTF@@AAEXXZ)


Thank You

SixDegrees
17th October 2010, 09:38
I don't work with Windows, but I'll note that there haven't been many complaints about building Webkit here. It pretty much seems to compile right out of the box. So I suspect that your issues are caused by whatever your earlier issues were, and whatever solutions you applied to get past them.

wynand
17th October 2010, 10:02
You can sometimes get these linker error's if those functions mentioned "QChar::toCaseFolded(unsigned int)" and "QChar::category(unsigned int)" call functions to libraries you are not linking against. I've seen it a lot when using pthreads in VS2008. VS2008 would tell you that it could not find the definition for "QChar::toCaseFolded(unsigned int)", but it's because of a undefined function inside those functions. (If that makes sense) Maybe check the functions listed in the linker errors and see if the make obvious function calls to libraries you are not currently linking against. I've noticed such things as "CrossThreadRefCounted" which suggest there is threading going on under the hood, maybe try adding "pthreads" to your linked in libs.