Could not determine the path to the binaries...
-
I've been having the worst possible trouble trying to get Qt to compile a very simple beginner program, and now it's starting to drive me insane.
I'm very new to programming, so please bare with me. The whole lib's and dll's are still quite a engima to me, I thought libs were separate statically linked libraries but apparently you can statically link a .dll file using it's associated .lib (:S). Plus Qmake and it's cross-platform build ability and quite how it functions, console commands is also an area of confusion. If anyone would care to explain that would be nice.
Anyway regardless my real issue is I've been trying to compile an OpenGL application. Following the initial two attempts there was an issue with finding QApplication.h. This was resolved by following some advice to clean the build folder and simply run QMake. This worked but the build was followed by errors with the inability to open the "OpenGL.exe". I figured this has something to do with me constantly deleting the build folder. I didn't know how to remedy those errors so I just played around with the .pro (not really understanding what I was doing).
Furthermore after much more bewildering errors, the whole QtCreator decided to crap up on me. After attempting to run it in administrator and restarting it there's now a warning symbol in the QtCreator -> Tools -> Build & Run -> Kits. This symbol suggests the Microsoft Visual 2010 compiler cannot produce code for this Qt Version. Even though it was perfectly happy to compile earlier and detected Visual Studio 2010 express (I followed the steps including Windows 7.1 SDK and SP1 to ensure it was fine).
Additionally there is an error suggesting "Mkspec not found in Qt Version" even while there is a folder inside mkspecs ("win32-msvc2010") containing a qmake.conf. So everything appears in order but I'm unable to select a Qt Version under kits, it's a blank box, attempting to click manage leads me to the "Qt Version" tab, where I'm greeted by another error suggesting:
"Could not determine the path to the binaries of the Qt installation, maybe the qmake path is wrong?"
However on further inspection the path is exactly right and attempts to add manually lead to the exact some folder where "qmake.exe" is rightfully located.
I'm pulling my bloody hair out, I have seriously no clue about 99% of what I'm doing and this isn't helping. Other people on-line with similar errors are generally Linux users (which I have no experience with so I can't transpose their resolution).
Others are suggesting using "Command Prompt" while I can follow what they're doing step-by-step such as typing "qmake -set QT_VERSION "5.0.1"" I have no idea if this is working or valid. Still cmd.exe function and how it works is also an engima and it doesn't help when some people suggest just set PATH+= ? Are these people referring to typing this into the .pro file. This does absolutely nothing because even after doing so I can't compile the code because the immediate error is invalid QtVersion, attempts to get a fresh .pro file are also impossible because now making new projects asserts no kits are available.
God I'm going crazy please help me understand this stuff and fix the problem. I'd be extremely grateful.
-
FYI I used "qmake -query" and was given this list of information:
QT_INSTALL_PREFIX:c:\Qt\5.0.1"
QT_VERSION:5.0.1
QT_SYSROOT:
QT_INSTALL_PREFIX:C:\Qt\5.0.1\msvc2010
QT_INSTALL_ARCHDATA:C:\Qt\5.0.1\msvc2010
QT_INSTALL_DATA:C:\Qt\5.0.1\msvc2010
QT_INSTALL_DOCS:C:\Qt\5.0.1\msvc2010\doc
QT_INSTALL_HEADERS:C:\Qt\5.0.1\msvc2010\include
QT_INSTALL_LIBS:C:\Qt\5.0.1\msvc2010\lib
QT_INSTALL_LIBEXECS:C:\Qt\5.0.1\msvc2010\libexec
QT_INSTALL_BINS:C:\Qt\5.0.1\msvc2010\bin
QT_INSTALL_TESTS:C:\Qt\5.0.1\msvc2010\tests
QT_INSTALL_PLUGINS:C:\Qt\5.0.1\msvc2010\plugins
QT_INSTALL_IMPORTS:C:\Qt\5.0.1\msvc2010\imports
QT_INSTALL_QML:C:\Qt\5.0.1\msvc2010\qml
QT_INSTALL_TRANSLATIONS:C:\Qt\5.0.1\msvc2010\translations
QT_INSTALL_CONFIGURATION:
QT_INSTALL_EXAMPLES:C:\Qt\5.0.1\msvc2010\examples
QT_INSTALL_DEMOS:C:\Qt\5.0.1\msvc2010\examples
QT_HOST_PREFIX:C:\Qt\5.0.1\msvc2010
QT_HOST_DATA:C:\Qt\5.0.1\msvc2010
QT_HOST_BINS:C:\Qt\5.0.1\msvc2010\bin
QMAKE_SPEC:win32-msvc2010
QMAKE_XSPEC:win32-msvc2010
QMAKE_VERSION:3.0
QT_VERSION:5.0.1Everything seems in order, not entirely sure why those extra "" are there. Is that a problem? And yes my install directory is "Qt\5.0.1" not the default "Qt\Qt5.0.1\5.0.1" I changed it because the default is quite redundant. Please bare in mind I reinstalled Qt5 after all these errors and changed the install directory, so this change in directory is clearly not the cause as it was the "default" path initially. As you can tell therefore a reinstall didn't fix the problematic paths.
-
Here is a post http://qt-project.org/forums/viewthread/23946 , I have no idea about what they were talking about, BUT the 'qmake -query' output make sence.
update: s/make/makes/
-
Yeah it definitely is the two "\" slashes causing the problem. Thanks for the help Xingtao, and also this was the problem before the reinstall, in otherwords the reinstall did nothing to alleviate the errors.
Anyway do you know of anyway to overwrite the default paths given by "QMake -query", when you use "QMake -set" and check again with "QMake -query" it doesn't override the original values rather it adds an additional listing to the top of the table. Know of anyway I can also more swiftly change the "" on all the values or do I have to spend forever :(.
At least it's working I guess that's something to be happy for, thanks.
-
You're welcome!
The result of 'qmake -query' is come from QLibraryInfo.
Most of these infomation are established when Qt is configured. But this infomation can be override by qt.conf file. Here is the doc: http://doc-snapshot.qt-project.org/5.0/qtdoc/qt-conf.html'qmake -set' stored the property to qmake config file named QMake.conf.