Search code examples
visual-studio-2010qtqt4qt-creatorqmake

QtCreator + Visual Studio 2010 compile = link error (SysAllocString@4)


I am using Visual Studio with a couple of Qt4 projects and I would like to switch to QtCreator, but keeping the msvc compiler.

After configuring everything in QtCreator I get this linker error:

LNK2001: unresolved external symbol _imp_SysAllocString@4

Any idea about what is going on? I don't get this error if I compile using Visual Studio.


Solution

  • You need to link against OleAut32.dll. Try adding this to your qmake project file:

    win32: LIBS += -loleaut32 -lole32