Solved Cannot start the project in Qt for Mac OS
-
Hi!
I've recently started to use Qt (5.15.2) on my Mac (Mac OS Mojave). So it's my first question here.
When I try to start a project on Terminal, it was the message that 'Unable to find any JVMs matching version "1.8"' and stopped.
I've installed SDK 8 from Oracle (8.281) and installed it. No errors but there is no Java icon in Settings.
java –version
command does not work
(Error: Could not find or load main class –version).It seems to me that it's needed to do some magic passes but I have no idea which exactly...
But I decided to try start Qt project anyway.
Now the result of launch is like this:Last login: Tue Apr 13 11:56:12 on ttys000
You have mail.
/var/folders/yh/5cyx35gd07x734h568l3p_p00000gp/T/tmpDKGC31 ; exit;Macintosh:~ apple$ /var/folders/yh/5cyx35gd07x734h568l3p_p00000gp/T/tmpDKGC31 ; exit;
Cannot connect creator comm socket /private/var/folders/yh/5cyx35gd07x734h568l3p_p00000gp/T/QtCreator.cOfnHp/stub-socket: No such file or directory
Для закрытия данного окна нажмите <ВВОД>...logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.It probably sees the JVM but 'not clear'.
What is wrong and how to solve this issue, please? -
@loa3 You don't need Java if you target MacOS. For which exact platform do you want to build your app?
-
@jsulm At the moment I study 'pure' C++ for use it for PLCs in future. So I need simple console program which use standard IO functions like cin/cout/file read/write.
First time I launched projects into Qt without Terminal. But just simple cin does not work there.
So I set up Launch in termenal checkbox as recommended on some resources. And it does not work. -
@loa3 What exact Qt version did you install? Is it possible that you installed Qt for Android (which requires Java)?
Do you start your app from QtCreator? -
-
@loa3 said in Cannot start the project in Qt for Mac OS:
Qt Creator 4.14.0
Qt 5.15.2 (Clang 11.0 (Apple), 64 бита)This only says what Qt version was used to build QtCreator, not which Qt version you are using for your project.
What kind of project did you create?
-
@jsulm where can I check Qt version? It was info from About which I've sent earlier.
-
@loa3 said in Cannot start the project in Qt for Mac OS:
where can I check Qt version?
In your Kit configuration (in QtCreator)
-
@jsulm I can not find any more except
Qt Creator 4.14.0
Qt 5.15.2 mentioned above -
@loa3 As I said: you need to check your Kit. In QtCreator go to "Tools/Options/Kits".
-
Tools seems to be menu item selected. But if yes I can not find something that means 'options'. there...
-
@loa3 Please search for Kit configuration in QtCreator settings (I don't have QtCreator with Russian menues). As far as I know on MacOS application settings are in the left menu entry ("Qt Creator" in this case)...
-
It looks like 5.15.2
-
@loa3 Looks like desktop version. Then I don't know why you have this Java issue, I'm not Mac expert.
-
@jsulm said in Cannot start the project in Qt for Mac OS:
@loa3 Looks like desktop version. Then I don't know why you have this Java issue, I'm not Mac expert.
Yes I think it is not Qt issue but something wrong 'around' it...
-
@jsulm said in Cannot start the project in Qt for Mac OS:
@loa3 Looks like desktop version. Then I don't know why you have this Java issue, I'm not Mac expert.
Do you have any idea where can I find Mac/Qt experts, please?
-
-
@jsulm Many thanks!
-
Hi,
Can you show your environment variables in the console ?
What version of macOS are you running ? -
@SGaist said in Cannot start the project in Qt for Mac OS:
Can you show your environment variables in the console ?
Yes, please:
Macintosh:~ apple$ printenv
TERM_PROGRAM=Apple_Terminal
SHELL=/bin/bash
TERM=xterm-256color
TMPDIR=/var/folders/yh/5cyx35gd07x734h568l3p_p00000gp/T/
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.cV6k4mxtJJ/Render
TERM_PROGRAM_VERSION=421.2
TERM_SESSION_ID=C9973591-7071-476A-AF24-C559E765CCB1
USER=apple
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.J0oZF6hFtw/Listeners
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Frameworks/Mono.framework/Versions/Current/Commands
PWD=/Users/apple
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home
LANG=ru_RU.UTF-8
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
SHLVL=1
HOME=/Users/apple
LOGNAME=apple
_=/usr/bin/printenv(I'm not sure that this is what you mean, sorry)
What version of macOS are you running ?
macOS 10.14.6