QT Windows 7 Installation Issues
-
Hi and welcome to devnet,
What exact version of Qt did you install ?
Where did you get the compiler from ?
How did you install it ? (online installer/offline installer/other ?) -
I use the online installer "qt-unified-windows-x86-3.0.2-online.exe"
from there I go into the setup and make the following selections:
I believe by checking the MinGW it installs the compiler?
I did try on one reinstall the MSVC 2015 but also had the same issue.
Hopefully that answers your questions.
I am going to try reinstalling it one last time before I head out for the weekend. At home I will be able to play around with it on my desktop.
-
So like I said, I reinstalled, checking the MinGW and the MSVC 2015 64-bit options.
When I set my kit to the MSVC this is the error I get:
C:/Qt/5.10.1/msvc2015_64/mkspecs/features/toolchain.prf(215): Variable QMAKE_CXX.COMPILER_MACROS is not defined.
Project ERROR: msvc-version.conf loaded but QMAKE_MSC_VER isn't set
Error while parsing file C:*************\untitled1.pro. Giving up."When selecting the MinGW I get the above error defined in the original post.
I did notice that compiler on the Kit for the MSVC there is no compiler (dropping down only has MinGW options)... So I am installing visual studio to see if that fixes it.
-
hi @MrShawn
so you installed Qt for MinGW, but did you install the compiler also? Its in the Tools section.
Afterwards it should work just fine.
If you want to use MSVC, then you have to install it separately.
Regards
-
@MrShawn said in QT Windows 7 Installation Issues:
I am very (VERY) new to QT. Most of my c++ experience is in ubuntu basically calling the g++ compiler on my code. This means that my windows programming experience is also very minimal - only having done a little in Visual Studio.
Hi @MrShawn, and welcome to the Qt Dev Net!
New-ness to Qt, C++, or Windows are not significant barriers. Qt is designed to be easy to learn, and this community is happy to help.
I already had Visual Studio installed as well, maybe this is the problem.
Usually, having Visual Studio or not should not matter at all.
After installing the most recent version available (I use the MinGW compiler as well) from the installer I open a new project and I basically get this weird error:
"Project ERROR: failed to parse default search paths from compiler output
Error while parsing file C:*************\test3.pro. Giving up."Does your project path contain any spaces at all? (It's best to use a path with no spaces).
What happens if you try to open one of the examples? (from Qt Creator's Welcome screen, click "Examples")
I am trying to install QT on my Windows 7 work computer (because I want to get away from LabVIEW and actually write real code).
Off-topic for this thread, but I'm curious: Why you feel that LabVIEW code doesn't count as "real code"?
-
Thanks for the help guys... I tried reinstalling with the newest options(5.10.1)... made sure the compiler is checked off in the tools as well. Still the same problem here are some Screen Shots:
I looked and all the .exe files being referenced for the compilers are there also the qmake.exe is where it seems to be looking.
@JKSH
"Off-topic for this thread, but I'm curious: Why you feel that LabVIEW code doesn't count as "real code"?"I should preface by saying I may have been a little salty when I wrote that.
Anyways there are a lot of reasons I feel this way - but the best I have seen came from someone else. They said something along the lines of that he can make labview with C++ but he cant make it with labview. And to reinforce this when I look at the forums (I think the LAVA one) there is a member that works on LV and his signature is along the lines of "I write C++ so you don't have to". Having only started in LV months ago - I was somewhat insulted by this.
Plus lets be honest me personally I am not very good at art and drawing which I am forced to do in LV. In the end I would just rather write text based code, and C++ is really the language I want to use.
I find I am constantly trying to undermine the LV paradigm of 'data flow' and trying to do a lot of object oriented code which in my honest opinion breaks down in LV - even when using referenced based objects and actor framework in LV.
LV isn't world breakingly bad - but it isn't really for me.
-
@JKSH said in QT Windows 7 Installation Issues:
Off-topic for this thread, but I'm curious: Why you feel that LabVIEW code doesn't count as "real code"?
:D good one, I would define LabView more as an "Point and Click-adventure" than anything else.
To be honest there weren't many programming languages introduced to me during my studies that I liked ...
-
@MrShawn said in QT Windows 7 Installation Issues:
I looked and all the .exe files being referenced for the compilers are there also the qmake.exe is where it seems to be looking.
Hmm... your error messages are not caused by missing files. Your screenshots show that everything is present, and Qt Creator has found your compiler (MinGW). Qt Creator is complaining that the compiler didn't produce the expected output.
I suspect that @jsulm is on the right track -- perhaps something in your environment is causing Qt Creator to load the wrong version of an .exe. To test this, open the Command Prompt and run the following to launch Qt Creator with a clean environment:
cd C:\Qt\Tools\QtCreator\bin\
set path=""
qtcreator.exe
Are you able to build an example project now?
P.S. I'm interested in following up on more comments about LabVIEW, but gotta run for now. Also, let's focus on getting your Win7 system set up first!
-
Going through CMD.
Same error when I load it and when I go to compile it I get 'Cannot run compiler 'g++'. Output:'@jsulm
I am fairly sure I have write access there, I am admin.
I copied to my documents and tried to open and compile same errors.
Not really sure what you're asking on the second part - sorry. -
Disabled my AV - still the same errors. I am pretty sure I am unable to log in as a local user unfortunately. I tried making one it is giving me some weird error. I am wondering if this is the cause of my problem honestly. I was also suspecting that it wasn't compatible with windows 7 because I have been forced to install older versions of MS Visual Studio and MSSqlStuff due to windows 7 compatibility issues.
-
@MrShawn said in QT Windows 7 Installation Issues:
Going through CMD.
Same error when I load it and when I go to compile it I get 'Cannot run compiler 'g++'. Output:'Ok, it looks like something is preventing g++ from running. @hskoglund has already asked you to try the antivirus, so it must be something else.
Next check: See if MinGW actually works on your computer or not. From CMD, run:
> g++ -v
> cd C:\Qt\Tools\mingw530_32\bin\
> g++ -v
(The 1st line is a sanity check: It should say that "'g++' is not recognized...". If it doesn't, let us know. The 3rd line should print useful information, now that you've cd'ed into the correct folder)
Post the final output of g++ here. To make it easier to copy-and-paste, you can stream the output to a text file:
g++ -v 2> log.txt
Mine says:
Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=C:/Qt/Tools/mingw530_32/bin/../libexec/gcc/i686-w64-mingw32/5.3.0/lto-wrapper.exe Target: i686-w64-mingw32 Configured with: ../../../src/gcc-5.3.0/configure --host=i686-w64-mingw32 --build=i686-w64-mingw32 --target=i686-w64-mingw32 --prefix=/mingw32 --with-sysroot=/c/mingw530/i686-530-posix-dwarf-rt_v4-rev0/mingw32 --with-gxx-include-dir=/mingw32/i686-w64-mingw32/include/c++ --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --disable-sjlj-exceptions --with-dwarf2 --disable-isl-version-check --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=i686 --with-tune=generic --with-libiconv --with-system-zlib --with-gmp=/c/mingw530/prerequisites/i686-w64-mingw32-static --with-mpfr=/c/mingw530/prerequisites/i686-w64-mingw32-static --with-mpc=/c/mingw530/prerequisites/i686-w64-mingw32-static --with-isl=/c/mingw530/prerequisites/i686-w64-mingw32-static --with-pkgversion='i686-posix-dwarf-rev0, Built by MinGW-W64 project' --with-bugurl=http://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -I/c/mingw530/i686-530-posix-dwarf-rt_v4-rev0/mingw32/opt/include -I/c/mingw530/prerequisites/i686-zlib-static/include -I/c/mingw530/prerequisites/i686-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -I/c/mingw530/i686-530-posix-dwarf-rt_v4-rev0/mingw32/opt/include -I/c/mingw530/prerequisites/i686-zlib-static/include -I/c/mingw530/prerequisites/i686-w64-mingw32-static/include' CPPFLAGS= LDFLAGS='-pipe -L/c/mingw530/i686-530-posix-dwarf-rt_v4-rev0/mingw32/opt/lib -L/c/mingw530/prerequisites/i686-zlib-static/lib -L/c/mingw530/prerequisites/i686-w64-mingw32-static/lib -Wl,--large-address-aware' Thread model: posix gcc version 5.3.0 (i686-posix-dwarf-rev0, Built by MinGW-W64 project)
If yours shows the same, try to use it to compile a Hello World C++ file, just like how you did on Ubuntu:
> C:\Qt\Tools\mingw530_32\bin\g++ main.cpp
Does it work?
-
Heres the log - just as you said.
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=C:/Qt/Tools/mingw530_32/bin/../libexec/gcc/i686-w64-mingw32/5.3.0/lto-wrapper.exe
Target: i686-w64-mingw32
Configured with: ../../../src/gcc-5.3.0/configure --host=i686-w64-mingw32 --build=i686-w64-mingw32 --target=i686-w64-mingw32 --prefix=/mingw32 --with-sysroot=/c/mingw530/i686-530-posix-dwarf-rt_v4-rev0/mingw32 --with-gxx-include-dir=/mingw32/i686-w64-mingw32/include/c++ --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --disable-sjlj-exceptions --with-dwarf2 --disable-isl-version-check --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=i686 --with-tune=generic --with-libiconv --with-system-zlib --with-gmp=/c/mingw530/prerequisites/i686-w64-mingw32-static --with-mpfr=/c/mingw530/prerequisites/i686-w64-mingw32-static --with-mpc=/c/mingw530/prerequisites/i686-w64-mingw32-static --with-isl=/c/mingw530/prerequisites/i686-w64-mingw32-static --with-pkgversion='i686-posix-dwarf-rev0, Built by MinGW-W64 project' --with-bugurl=http://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -I/c/mingw530/i686-530-posix-dwarf-rt_v4-rev0/mingw32/opt/include -I/c/mingw530/prerequisites/i686-zlib-static/include -I/c/mingw530/prerequisites/i686-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -I/c/mingw530/i686-530-posix-dwarf-rt_v4-rev0/mingw32/opt/include -I/c/mingw530/prerequisites/i686-zlib-static/include -I/c/mingw530/prerequisites/i686-w64-mingw32-static/include' CPPFLAGS= LDFLAGS='-pipe -L/c/mingw530/i686-530-posix-dwarf-rt_v4-rev0/mingw32/opt/lib -L/c/mingw530/prerequisites/i686-zlib-static/lib -L/c/mingw530/prerequisites/i686-w64-mingw32-static/lib -Wl,--large-address-aware'
Thread model: posix
gcc version 5.3.0 (i686-posix-dwarf-rev0, Built by MinGW-W64 project)Calling the g++ on code does work and it compiles.
Weird man. I got another computer that is windows behind me that I host some stuff from. I am going to install Qt on that and see if it works fine.
-
@MrShawn
so, the problem lies with QtCreator than.You said you deinstalled, added and removed everything at least once. Is that also true for Qt-Creator? The IDE is not something you can deselect via maintenance tool, one has to sadly wipe everything clean.
-
@J-Hilk
Hey, When I removed it I went to control panel programs and uninstalled Qt there.Is there a better way to remove everything... I also used the maintenance tool to do the same by clicking remove all components, as I removed it multiple times.
I will give it another shot to uninstall everything.
UPDATE: Still no luck, I uninstalled, removed everything - cleared out what was left in the Qt folder, and I also installed the fresh version to a different location. I still get the same exact errors. Too bad for me.
-
@MrShawn said in QT Windows 7 Installation Issues:
UPDATE: Still no luck, I uninstalled, removed everything - cleared out what was left in the Qt folder, and I also installed the fresh version to a different location. I still get the same exact errors. Too bad for me.
For a proper clean uninstall, you might need to also clear out these folders:
- C:\Users<USERNAME>\AppData\Local\QtProject
- C:\Users<USERNAME>\AppData\Roaming\Qt
- C:\Users<USERNAME>\AppData\Roaming\QtProject
@MrShawn said in QT Windows 7 Installation Issues:
I also installed Visual Studio with the C++ compiler and it does not auto detect that.
If you installed the C++ tools Visual Studio 2015/2017 and rebooted, then installed Qt 5.10 for the same version of Visual Studio, Qt Creator would normally auto-detect everything.
If it doesn't for some reason, you can add them manually:
(But if auto-detection doesn't happen, it's a sign that something in your system is blocking Qt Creator from interacting with the compilers... would your IT department be able to shed any light on this?)