2

I just updated my Qt to 4.8.3, because the program built from older version is not compatible to the new framework.

So I have to upgrade.

This process was frustrating and time consuming. So many problems came out.

I download Qt from this url: http://qt-project.org/downloads

At beginning, I installed the MinGW one (I'm not a fan of MSVC).

I tried the newest ( I think it's 4.6) version of MinGW and order version (4.4). However, after I installed MinGW and tried to install Qt 4.8.3, during the process, the following message shows up:

There is a problem with your MinGW installation:
The installer could not find a valid C:\MinGW\include\w32api.h (Only versions with W32API 3.13 are supported)

Do you still want to continue? (Your installation may not work)

The 4.6 version does have this w32api.h file, I don't know what's going on. And I have trouble finding MinGW 4.4 with this head file.

I decide to ignore this warning and continue to install Qt and Qt creator. After that, I opened my current project, configure it (why the configuration become so complex...), I tried to build it.

Then the following message shows up because some external lib I used requires Exception Handling:

exception handling disabled, use -fexceptions to enable

And I don't know how to enable the it. I tried to add -fexceptions flag in QMAKE_CXXFLAGS but it doesn't work.

By the way, I tried the VC version of Qt too, but I used the MinGW before and the VC compiler is quite different, if I use VC version, it will take a lot of time to make it compilable by VC compiler.

Does anyone know how to install Qt 4.8.3 on Windows? my project works fine before, now I just want to compile it successfully.......

These are not the only problem. I updated the Qt on Mac machine too, it is easier to have the compiler work since it's unix base.

However, I used QtWebkit lib in my project and obviously, they changed this lib and it's not compatible to order version.

I can compile my project on Mac, however, every time I run it, following massage shows up and the program stopped.

dyld: Symbol not found: _OBJC_CLASS_$_CALayerHost Referenced from: /Library/Frameworks/QtWebKit.framework/Versions/4/QtWebKit Expected in: /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore

The program has unexpectedly finished.

Does any one know how to solve this QtWebKit problem? I'll really appreciate.

I remembered that when Qt is under nokia, it's so easy to install and use, the Qt SDK is perfect.

I really hate the change made after it was bought by digia.........

Claire Huang
  • 961
  • 1
  • 18
  • 30

2 Answers2

2

I found solutions of my first two problems:

for the first problem, as I described, download the MinGW provided by Nokia Qt ftp.qt.nokia.com/misc/MinGW-gcc440_1.zip [ftp.qt.nokia.com] Tried several versions of MinGW 4.4, I think this is the only one works.

About the second problem, add following configure in the project file:

CONFIG += exceptions

Now the QWebKit problem is only one unsolved.

Claire Huang
  • 961
  • 1
  • 18
  • 30
  • Glad you were able to find a working MinGW. For the QtWebKit problem, are you sure that you are trying to run the program with the webkit DLL that came with Qt 4.8.3? – Phlucious Nov 16 '12 at 15:46
  • Thank you :) Yes, I just use the QtWebKit lib given by the installation. I found some discussion says that new QtWebKit only wokrs for OS X 10.7 or higher, I'm using the 10.5, I think that's the problem. – Claire Huang Nov 16 '12 at 20:48
  • I'm using MinGW 4.5.3 without problems. It must be something else. – Vinícius Gobbo A. de Oliveira Nov 30 '12 at 18:01
1

Is it all relevant that your include directory for MinGW has two "i's" in it or was that a typographic error when posted on SO? See:

The installer could not find a valid C:\MinGW\iinclude\w32api.h
Phlucious
  • 3,704
  • 28
  • 61
  • Do you have any idea about the Exception Handling? – Claire Huang Nov 15 '12 at 01:28
  • Have you tried just [downloading the libraries](http://releases.qt-project.org/qt4/source/qt-win-opensource-4.8.3-mingw.exe) insteading of [compiling from source](http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-src-4.8.3.zip)? Running the installer usually integrates with Qt Creator pretty seamlessly. I'm not sure about the exception handling. – Phlucious Nov 15 '12 at 17:01
  • I just noticed that the extra is my typo, not their bug. so I don't understand what's the problem since I have this w32api.h file on correct directory – Claire Huang Nov 15 '12 at 18:26
  • That's what I did. I download the libraries and install it. I didn't build it by myself, so it's wired that I got that message says that MinGW was not correctly installed. – Claire Huang Nov 15 '12 at 18:30