954,504 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

MinGW / QT / GCC Errors on WinXP

Hello altogether,

I am supposed to work through a project written in C++ and QT for Windows platforms. Now I am not an expert in window-related stuff. I installed MinGW 3.4.5 and QTSDK on Win XP SP3.

I am using the tool "qmake" to create a makefile with all dependecies and that works just nice.
Then I use "make" to do the compiling and I get massive errors like these:

C:/Programme/MinGW/Bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bi
ts/istream.tcc:973: error: `__num' was not declared in this scope


For me that looks like the installation of MinGW is somehow corrupted.

Does anybody know how to fix that? Are environment-variables missing? Or do I need to install any further libraries?

Many thanks in advance!
Simon

sDJh
Posting Whiz in Training
259 posts since Aug 2005
Reputation Points: 56
Solved Threads: 29
 

It looks like you have somewhere around Qt 4.4. There is now Qt 4.7 which comes with mingw 4.5, which is much more up to date. It could be a corrupt installation of mingw, so reinstalling your version might help, but try the latest version.

jonsca
Quantitative Phrenologist
Team Colleague
5,621 posts since Sep 2009
Reputation Points: 1,165
Solved Threads: 581
 

Hello jonsca,

I just double-checked my installation. QT is version 4.7.3 (up to date). But I do now remeber having had problems during the installation. I will have a look into it this week.

Are there backward compatibility issues with QT and MinGW?

Thank you anyway! Simon

sDJh
Posting Whiz in Training
259 posts since Aug 2005
Reputation Points: 56
Solved Threads: 29
 

There's a lot of stuff included in the default installation that's for embedded systems. I remember Qt getting confused between the embedded compilers and the actual gcc installation, so I removed the embedded ones (I think this was mainly an issue in QtCreator). I also seem to remember a permissions issue being a problem (and having to turn off my security program for the duration of the install). If either of those two ring a bell, you may want to reinstall.

I don't know anything about backwards compatibility issues, but I would trust that the version of mingw that it comes with can handle all the switches that their "make" tries to throw at it (and there's a ton, if you do a verbose run of the make). I don't know how well the different versions get along.

Try that out and see if it improves things.

jonsca
Quantitative Phrenologist
Team Colleague
5,621 posts since Sep 2009
Reputation Points: 1,165
Solved Threads: 581
 

I have downloaded "QT". On setup I realized that I have already installed "QT SDK". Do I need to install "QT" anyway? Could that be the problem? If so, I have to repartition my harddisk before installing.

sDJh
Posting Whiz in Training
259 posts since Aug 2005
Reputation Points: 56
Solved Threads: 29
 

I used Qt_SDK_Windows_online_v1_1_en . There may be an updated version by now.

A brief runthrough of what I think I selected for install:

Uncheck APIs (counterintuitive, but unless you're doing mobile development, not needed)

In Documentation: Get rid of Qt Mobility and Symbian (if you're just doing PC development)

Miscellaneous: Check Mingw 4.4 (Examples and sources if you need them)
Development tools: Desktop Qt: this is the meat of it, select Qt 4.7.3 (or latest), check the third option down off of that to get the mingw version (no need to take the Visual Studio version if you don't need it, that will save you a ton of disk space)

Uncheck Maemo Toolchain (unless you need these compilers, but they are also for mobile development -- I think it puts all of these on the path, which gums up trying to use the regular compiler)

Try it with that, and babysit the error messages, as if you have a firewall/antivirus all of the command line programs it's running in the background will drive that AV program nuts (and Qt is a reputable product), so you may need to turn it off. If it doesn't take a long time to install, something is wrong, because this is a mammoth.

jonsca
Quantitative Phrenologist
Team Colleague
5,621 posts since Sep 2009
Reputation Points: 1,165
Solved Threads: 581
 

Hello jonsca,

Yesterday I got new headers from the former developer. Now I don't get any errors from the installation. For me it looks like that project overrides some standard-headers and redefines datastructures. But I don't know and I don't mind!

Thank you for your quick replies anyway!
Simon

sDJh
Posting Whiz in Training
259 posts since Aug 2005
Reputation Points: 56
Solved Threads: 29
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: