title: Statically Compiling Qt 4.6.2
body: <p>This what I did but it results in errors:</p>
  
  <p>1: In win32-msvc2008\qmake.conf I set <code>QMAKE_CFLAGS_RELEASE = -O1 -Og -GL -MD</code></p>
  
  <p>2: From MSVC2008 CMD I run <code>vcvarsall.bat x86</code> and <code>vcvars32.bat "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin</code></p>
  
  <p>3: From Qt 4.6.2 CMD I run the following</p>
  
  <blockquote>
    <p>C:\Qt\4.6.2>configure -release 
    -nomake examples -nomake demos -no-exceptions -n o-stl -no-rtti -no-qt3support -no-scripttools -no-openssl -no-opengl -no-webkit
    -no-phonon -no-style-motif -no-style-cde -no-style-cleanlooks -no-style-plastique
    -no-sql-sqlite -platform win32-msvc2008 -static -qt-libjpeg
    -qt-zlib -qt-libpng</p>
  </blockquote>
  
  <p>and then <code>nmake</code></p>
  
  <p>However, I ended up every time with these errors:</p>
  
  <blockquote>
  <pre><code>    link /LIBPATH:"c:\Qt\4.6.2\lib"
  </code></pre>
    
    <p>/LIBPATH:"c:\Qt\4.6.2\lib" /NOLOGO
    /INCR EMENTAL:NO /MANIFEST
    /MANIFESTFILE:"tmp\obj\release_static\assistant_adp.interme
    diate.manifest" /SUBSYSTEM:WINDOWS
    "/MANIFESTDEPENDENCY:type='win32'
    name='Micro
    soft.Windows.Common-Controls'
    version='6.0.0.0'
    publicKeyToken='6595b64144ccf1df '
    language='<em>'
    processorArchitecture='</em>'"
    /OUT:......\bin\assistant_adp.exe @C
    :\DOCUME~1\Geeko\LOCALS~1\Temp\nm3F8.tmp
    fontpanel.obj : MSIL .netmodule or
    module compiled with /GL found;
    restarting li nk with /LTCG; add /LTCG
    to the link command line to improve
    linker performance main.obj : error
    LNK2001: unresolved external symbol
    "class QObject * __cdecl qt
    _plugin_instance_qjpeg(void)" (?qt_plugin_instance_qjpeg@@YAPAVQObject@@XZ)
    ......\bin\assistant_adp.exe : fatal
    error LNK1120: 1 unresolved externals</p>
    
    <p>NMAKE : fatal error U1077:
    '"C:\Program Files\Microsoft Visual
    Studio 9.0\VC\BIN \link.EXE"' : return
    code '0x460' Stop.</p>
    
    <p>NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN \nmake.exe"' : return code '0x2' Stop.</p>
    
    <p>NMAKE : fatal error U1077: 'cd' : return code '0x2' Stop.</p>
    
    <p>NMAKE : fatal error U1077: 'cd' : return code '0x2' Stop.</p>
    
    <p>NMAKE : fatal error U1077: 'cd' : return code '0x2' Stop.</p>
  </blockquote>
  
  <p>Thank you in deed.</p>