-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error at running example #2
Comments
I suspect qtpath is behaving differently to what I am used to. |
output: Btw: I am running Qt6 latest, which is 6.2.4+dfsg-2ubuntu1 Edit: I also have installed Qt with the Maintenacetool and that is indeed 6.4.1 but that is it. I didn't do anything further. |
Maybe try qtchooser (https://manpages.ubuntu.com/manpages/kinetic/en/man1/qtchooser.1.html)? |
What did you do after you run the Qt MaintenanceTool? How did you make Qt 6.4.1 "active" and running? I did set The result of But before I did install Qt6: This is happening on both of my Linux systems (one with Xubuntu and on Linux Mint) |
What does On my system setting ubuntu@nimqt:~/nimqt$ qtchooser -list-versions
4
5
qt4-x86_64-linux-gnu
qt4
qt5-x86_64-linux-gnu
qt5
qt6
ubuntu@nimqt:~/nimqt$ qtchooser -print-env
qtchooser: could not find a Qt installation of ''
ubuntu@nimqt:~/nimqt$ QT_SELECT=qt6 qtchooser -print-env
QT_SELECT="qt6"
QTTOOLDIR="/usr/lib/qt6/bin"
QTLIBDIR="/usr/lib/x86_64-linux-gnu" |
The only Qt variables inside my "set" command are:
I run this on my Linux Mint computer so gtk2 is normal. After I run
When I run
|
Now I have something more. It still doesn't compile completely but I think that we are getting there. What did I do? After struggling with qtchooser I decided to check the manual and after that I made it work.
Now running in nimqt the command But there is an error: This: In function: Probably leads to: This is the complete error message:
|
I have never encountered that error, so maybe it is still linking the wrong libraries. |
I pushed a bunch of commits, can you check if the undefined references still occur? QMAKE_PATH=/home/user/Qt/6.4.1/gcc_64/bin/qmake make calc |
No. after a
But good job! I think that you are on the right track. |
Huh, weird that I did not encounter that. But that should be fixed now! :) |
After I got rid of the SET stuff inside my .bashrc and try to install nimqt again, I got a lot of linker errors, so I did set on de SET stuff again and got the same old story:
I am wondering: if you can compile then why can't I? What OS are you using? And what toolchain? |
I'm running it on OSX (installed Qt6.4.1 using brew) and an ubuntu virtual machine running in multipass (with Qt6.2.4 installed using apt). On both have nim 1.6.10 installed using choosenim. Something suspicious: in void setObjectName(const QString &name) { doSetObjectName(name); } while for Qt6.2.4 void setObjectName(const QString &name); (and doSetObjectName is not defined in that header) So my guess is that different Qt versions are used in different places? |
After reading your post a couple of times the only thing I have to say is: What a major ***** they are at Qt and I laughed quite a lot! This is so stupid. Never ever change an API ! (unless when you change it with a major release) Edit: I also used
|
Hmm I also have it on linux (hadn't installed X yet, and was just focused on getting it compiled). It seems to be related to handling commandline arguments. let app=newQApplication(@["test"])
echo static_QCoreApplication_arguments() I would expect this to print |
Newest commit fixed it for me, hopefully also for you :) The |
It is working!!!!!! Great job! It is working on both of my linux computers. And btw, I don't think that I can deal with the ".ui" files. I am way too novice about Nim. I am still learning it (and I really hate C++). My idea was indeed to parse the XML file but your solution is probably a lot better. So, I am sorry. But, a very good job! |
The installation of
nimble install https://github.com/jerous86/nimqt
was good.I installed Qt6 on my xubuntu 22.04 with the following command
sudo apt install qt6-base-dev
Then
git clone https://github.com/jerous86/nimqt
and
cd nimqt
So far so good ;-)
Running
nim cpp examples/hello.nim
however got me error messages and didn't work :-(Hint: used config file '/home/user/.choosenim/toolchains/nim-1.6.10/config/nim.cfg' [Conf]
Hint: used config file '/home/user/.choosenim/toolchains/nim-1.6.10/config/config.nims' [Conf]
........................................................................................................................................................
CC: ../../.nimble/pkgs/nimqt-0.1/nimqt/qtcore/qstring.nim
CC: ../../.nimble/pkgs/nimqt-0.1/nimqt/qtcore/qobject.nim
CC: ../../.nimble/pkgs/nimqt-0.1/nimqt.nim
CC: ../../.nimble/pkgs/nimqt-0.1/nimqt/qtwidgets/qapplication.nim
/home/user/.cache/nim/hello_d/@m..@s..@s.nimble@spkgs@snimqt-0.1@snimqt@sqtcore@sqstring.nim.cpp:8:10: fatal error: QtCore/qstring.h: No such file or directory
8 | #include "QtCore/qstring.h"
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
Error: execution of an external compiler program 'g++ -c -std=gnu++14 -funsigned-char -w -fmax-errors=3 -fpermissive -std=c++17 -I/home/user/.nimble/pkgs/nimqt-0.1 -Iqtpaths: Unknown option 'query'. -fPIC -I/home/user/.choosenim/toolchains/nim-1.6.10/lib -I/home/user/nimqt/examples -o /home/user/.cache/nim/hello_d/@m..@s..@s.nimble@spkgs@snimqt-0.1@snimqt@sqtcore@sqstring.nim.cpp.o /home/user/.cache/nim/hello_d/@m..@s..@s.nimble@spkgs@snimqt-0.1@snimqt@sqtcore@sqstring.nim.cpp' failed with exit code: 1
/home/user/.cache/nim/hello_d/@m..@s..@s.nimble@spkgs@snimqt-0.1@snimqt@sqtcore@sqobject.nim.cpp:8:10: fatal error: QtCore/qnamespace.h: No such file or directory
8 | #include "QtCore/qnamespace.h"
| ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
user@Thinkpad-t440p:~/nimqt$ /home/user/.cache/nim/hello_d/@m..@s..@s.nimble@spkgs@snimqt-0.1@snimqt.nim.cpp:8:10: fatal error: QtWidgets/qlayout.h: No such file or directory
8 | #include "QtWidgets/qlayout.h"
| ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
/home/user/.cache/nim/hello_d/@m..@s..@s.nimble@spkgs@snimqt-0.1@snimqt@sqtwidgets@sqapplication.nim.cpp:8:10: fatal error: QtWidgets/qapplication.h: No such file or directory
8 | #include "QtWidgets/qapplication.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
The text was updated successfully, but these errors were encountered: