Search code examples
c++visual-studio-2010qtqt4.7

Fail to compile QT 4.7.3 with Visual Studio 2010


After following guide on how to compile QT with Visual Studio 2010 I still havent managed to make it work.

I get the following error during the "configure" process.

LINK : fatal error LNK1104: cannot open file 'libcpmt.lib'
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\link.EXE"' : return code '0x450'

I mainly followed something like this:

How to build Qt for Visual Studio 2010

Thank you


Solution

  • Make sure you

    • Open a Visual Studio command prompt, or run vcvars32.bat to set up Visual Studio's environment vars properly
    • Extend the PATH variable to include $(QTDIR)\bin, where $(QTDIR) is where you installed Qt
    • Just for comparison, here's my configure string: configure -debug-and-release -opensource -shared -ltcg -no-accessibility -no-qt3support
    • Then you can run nmake and go to dinner.