1

I need to compile Qt 3.3.6 on my Win 7 PC to use it in combination with my MSVC2012 C++ compiler (MSVS 2012 Professional).

The simple reason is that I have a Qt 3.3.6 license and a lot of Qt 3.3.6 source code. So, a Qt upgrade is not an option. "Google" does not help...

Edited:16/11/10 1:40 pm

I already tried to compile it by starting a shell via VS2012 (Tools/VisualStudioCommandPrompt) and changing the cwd to the Qt directory containing the appropriate Makefile:

C:\Qt\3.3.6>bin\configure.exe -redo -spec win32-msvc2012
License file not found in C:/Users/mdew
Enterprise modules will not be available.

QMAKESPEC...................win32-msvc
Maketool....................nmake

[...list of all the installed programs...]

Configuration:
    nocrosscompiler
    dialogs
    iconview
    kernel
    styles
    tools
    widgets
    workspace
    minimal-config
    small-config
    medium-config
    large-config
    full-config
    release
    thread
    no-gif
    zlib
    jpeg
    mng
    png
    bigcodecs
    no-tablet
Debug symbols...............no
Thread support..............yes

Accessibility support.......no
Big Textcodecs..............yes
Tablet support..............no
STL support.................yes
Additional exports..........no
Exception support...........yes
RTTI support................yes
OpenGL support..............no

Image formats:
    GIF support.............no
    MNG support.............qt
    JPEG support............qt
    PNG support.............qt

Styles:
    Windows.................yes
    Windows XP..............no
    Motif...................yes
    Platinum................yes
    MotifPlus...............yes
    CDE.....................yes
    SGI.....................yes

Sql Drivers:
    ODBC....................no
    MySQL...................no
    OCI.....................no
    PostgreSQL..............no
    TDS.....................no
    DB2.....................no
    SQLite..................no
    Interbase...............no

Sources are in..............C:\Qt\3.3.6
Install prefix..............C:\Qt\3.3.6
Headers installed to........C:\Qt\3.3.6\include
Libraries installed to......C:\Qt\3.3.6\lib
Plugins installed to........C:\Qt\3.3.6\plugins
Binaries installed to.......C:\Qt\3.3.6\bin
Docs installed to...........C:\Qt\3.3.6\doc
Data installed to...........C:\Qt\3.3.6
Translations installed to...C:\Qt\3.3.6\translations


Creating qmake...

Microsoft (R) Program Maintenance Utility Version 11.00.61030.0
Copyright (C) Microsoft Corporation.  All rights reserved.

        cd qmake
NMAKE : fatal error U1077: 'cd' : return code '0x1'
Stop.
Building qmake failed, return code 2

So, my attempt to compile it via MSVS2012 failed. NMAKE gets in trouble.

What am I doing wrong?

Thank you in advance for any hint!

BR mdew

mdew
  • 1,479
  • 1
  • 9
  • 9
  • 1
    What problem do you get with compiling? Btw, Qt3 is not supported by Qt team, so, possible, you will need a lot of fixed in Qt source to make it compilable. – Dmitry Sazonov Nov 10 '16 at 12:33
  • @Dimitry: Good point. I already tried to compile Qt 3.3.6, because I've the source. See my edited request above. I know, the license file is still missing. I still need to copy it. I'm afraid, this won't be the reason for the error. – mdew Nov 10 '16 at 13:16
  • 1
    So, did you try to read your output? What is `cd qmake`? Do you really have this dir? Did you set environment correctly? – Dmitry Sazonov Nov 10 '16 at 13:20
  • @Dimitry: You are right. My source text is not complete. THAT is the problem: qmake is not contained. I will get the complete source text and try it again. Thank you very much. You help was very important! I will report soon... – mdew Nov 10 '16 at 13:59
  • @Dimitri: Yes, I get Qt3.3.6 compiled. Thanks! – mdew Nov 17 '16 at 14:36
  • @Dimitri: One remark: I needed to start the compiling session inside a VS2012 Command Prompt with "nmake clean"! Then "configure.exe -redo -spec win32-msvc2012", and finally "nmake". – mdew Nov 17 '16 at 14:46

1 Answers1

2

have tried to compile Qt 3.3.6 from source with MSVC2015 and I've success.

Download Qt 3 source from https://sourceforge.net/projects/qtwin/files/Unofficial%20Qtwin/qt-win-3.3.6-6/

you must have QTDIR environment variable

set QTDIR=<your path to Qt 3 folder>

make sure bin folder is in your PATH

set PATH=%QTDIR%\bin;%PATH%

replace PATH_MAX with MAX_PATH in following files:

src\tools\qdir_win.cpp
src\tools\qdir.cpp

comment or remove

#include <winable.h>

from

src\kernel\qaccessible_win.cpp

run

configure.bat --help

configure.exe and link_includes.exe will be generated in bin folder.

cd bin
configure.exe -no-dsp -v

if you get errors saing error C3688: invalid literal suffix 'QTDLL_POSTFIX'

delete all QTDLL_POSTFIX in this files:

qmake\generators\win32\borland_bmake.cpp
qmake\generators\win32\mingw_make.cpp
qmake\generators\win32\msvc_dsp.cpp
qmake\generators\win32\msvc_nmake.cpp
qmake\generators\win32\msvc_vcproj.cpp

and change

QString dllStem = stem + QTDLL_POSTFIX;

to

QString dllStem = stem;

in

qmake\generators\win32\winmakefile.cpp

rerun

configure.exe -no-dsp -v

it should now compile successfully

Xplatforms
  • 2,102
  • 17
  • 26