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:'@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?)
-
EDIT***
So I recently went back to revisit this issue. For whatever reason my PATH variable wasn't set/didnt even exist for MinGW. I followed these instructions: http://www.mingw.org/wiki/Getting_Started
Scroll Down to 'Environment' and set up your path variables... My compiler location was 'C:\Qt\Tools\mingw530_32\bin'.Yea my problem is unique to this PC because I installed Qt on the desktop behind me, that I don't use other than to host random stuff. It worked first try no issues. I did ANOTHER fresh install deleting the folders you mentioned. Still nothing. For now I am OK with using the PC behind me for Qt. Maybe at some point I will ask for a new main desktop and with the fresh OS install Qt again then.
Thanks to everyone for their help, really appreciate it.
@JKSH
I too am interested in a LV discussion as I am curious on other people's perspectives on the matter, especially from Qt programmers. If you want to start a new post and link me to it I would be glad to discuss there. Honestly I am hoping that everything I can do with LV I can with Qt. My projects will entail a lot of device interfacing, some are NI devices which they provide libraries in c/c++ when installing their drivers. -
UPDATE*** (In case others have similar problems)
9 Months later I went on tackling this problem. Turns out it was the file wall. It was preventing QtCreator.exe and QMake.exe from calling the cmd.exe. That is why when I was running things manually it would appear like everything was working just fine, but as soon as I tried to use QtCreator it would not work. I was actually able to go into the windows event logs and see the blocking event from occurring.
After getting those white listed everything seems to be working good now.