Compiler Notes - Borland C++

Compiler Notes - Borland C++

Borland C++ Builder 5 (bcc32 5.5) is supported by Qt 3.
Borland C++ Builder 6 (bcc32 5.6) is supported by Qt 3.0.5 and later versions.

Please note that Borland compilers are not supported by Qt 4.

The easiest way to check the version number is the command bcc32 -v in a dos shell. The supported versions report Borland C++ X.Y for Win32 Copyright..., where X.Y is 5.5 or higher.

If you are using Borland C++ Builder 6 (bcc32 5.6) and you experience problems with the print dialog, please install the update 2 for Borland C++ Builder 6 which you can download from Please recompile the Qt library after you have installed this update.

Very old versions of make.exe have a limitation on the length of the command lines, which can lead to this error message when compiling Qt: Fatal: Command arguments too long. Fix by getting a newer make.exe from Borland.

Programs compiled with the Borland compilers and linked dynamically against Qt 3.2.0 and 3.2.1 do not run on Windows 95, 98 and Me. This problem was addressed for Qt 3.2.2.
The following information describes how to fix this problem for Qt 3.2.0 and 3.2.1.

Please apply the following patches to %QTDIR%\src\tools\qt_tools.pri and %QTDIR%\include\qwinexport.h:

--- src/tools/qt_tools.pri 2003-09-10 11:41:09 -0000
+++ src/tools/qt_tools.pri 2003-09-10 11:41:09 -0000
@@ -78,6 +78,8 @@
$$TOOLS_CPP/qthreadstorage_win.cpp \

+ win32-borland:SOURCES += $$TOOLS_CPP/qwinexport.cpp
wince-* {
SOURCES -= $$TOOLS_CPP/qdir_win.cpp \
$$TOOLS_CPP/qfile_win.cpp \

--- include/qwinexport.h 2003-09-10 11:41:09 -0000
+++ include/qwinexport.h 2003-09-10 11:41:09 -0000
@@ -33,7 +33,7 @@

-#if defined(Q_TEMPLATEDLL)
+#if defined(Q_TEMPLATEDLL) && ( !defined(Q_CC_BOR) || !defined(QT_MAKEDLL) || defined(Q_EXPORT_TEMPLATES) )

add the following file as %QTDIR%\src\tools\qwinexport.cpp:

#include qcanvas.h
#include qaccessible.h
#include qconnection.h
#include qguardedptr.h
#include qobject.h
#include qpoint.h
#include qrect.h
#include qsignalslotimp.h
#include qwidget.h
#include qhttp.h
#include private/qsqlextension_p.h
#include qsqlindex.h
#include qtable.h
#include qtable.h
#include qtable.h
#include qasciidict.h
#include qcstring.h
#include qdict.h
#include qintdict.h
#include qlibrary.h
#include qmap.h
#include qmemarray.h
#include qptrlist.h
#include qptrvector.h
#include qstring.h
#include qvaluelist.h
#include qvaluevector.h
#include qdockarea.h
#include qdockwindow.h

and recompile your Qt DLL (change to %QTDIR%\src, do "make clean" and "make").

If you try to compile the Windows XP style with Borland Builder 6, you are likely to get the error

"Error E2146
C:\Programme\Borland\CBuilder6\Include\uxtheme.h 176: Need an identifier to
To resolve this problem, please edit the uxtheme.h header file of your Borland Builder installation and apply the following patch:
@@ -173,7 +173,7 @@
TS_MIN, // minimum size
TS_TRUE, // size without stretching
TS_DRAW, // size that theme mgr will use to draw part
+} dummy_themesize;
// GetThemePartSize() - returns the specified size of the theme part
@@ -543,7 +543,7 @@
PO_CLASS, // property was found in the class section
PO_GLOBAL, // property was found in [globals] section
PO_NOTFOUND // property was not found
+} dummy_propertyorigin;

// GetThemePropertyOrigin()

Copyright 2008, Trolltech ASA