Closed hanyuone closed 4 years ago
master-ready-to-use
branch if you're on master
.If you are however on the master-ready-to-use
branch, make sure you're using the latest version. If so, try running make
in the ext/
directory. This is done by the postinstall script of qt5.cr
, but it's targeted at Linux machines only right now.
I'm on the master-ready-to-use
branch right now. Qt5
works fine with the Qt Creator, I'm not sure if I've installed anything incorrectly or not, I followed all the instructions on the Qt page when installing for Mac OS X.
Running make
in ext/
results in this:
cc -c -o qt_binding.o qt_binding.cpp -fPIC -fno-rtti -I/usr/include/qt -I.
qt_binding.cpp:9:10: fatal error: 'QtCore/QtCore' file not found
#include <QtCore/QtCore>
^
1 error generated.
make: *** [qt_binding.o] Error 1
Yep, path issue. I can't fix it as I don't have a Mac. Someone with an affinity to Mac OS machines would have to take over Maintainership for Mac-specific things.
Sadly, there is no good macOS emulation, as far as I am aware.
I use Manjaro and this project works very well, even in other Linux distros.
I don't have a mac, so I can't test it on OSX
I think I can create a OSX VM on VirtualBox (I know is quite illegal but hey I don't have a Mac 😅 )
I know that it's strange, but have this issue on Ubuntu 16.04 LTS (Qt 5.5). Tried to compile sample on two fresh installs in qemu and my host system, and got same error:
cc: error: /mnt/2TB/projects/lb-projects/qqq/lib/qt5/src/qt5/binding/../../../ext/binding_linux-gnu-x86_64-qt5.5.a: No such file or directory
Error: execution of command failed with code: 1: `cc "${@}" -o '/home/strike/.cache/crystal/crystal-run-qqq.tmp' -rdynamic /mnt/2TB/projects/lb-projects/qqq/lib/qt5/src/qt5/binding/../../../ext/binding_linux-gnu-x86_64-qt5.5.a -lstdc++ -lQt5Core -lQt5Gui -lQt5Widgets -lpcre -lgc -lpthread /usr/share/crystal/src/ext/libcrystal.a -levent -lrt -ldl -L/usr/lib -L/usr/local/lib`
ls -la
in lib/qt5/ext/
:
$ ls -la
total 10224
drwxrwxr-x 1 strike strike 546 Feb 19 16:28 .
drwxrwxr-x 1 strike strike 264 Feb 19 16:24 ..
-rw-rw-r-- 1 strike strike 35 Dec 26 23:57 .gitignore
-rw-rw-r-- 1 strike strike 416 Dec 26 23:57 Makefile
-rw-rw-r-- 1 strike strike 3785 Dec 26 23:57 bindgen_helper.hpp
-rw-rw-r-- 1 strike strike 2565 Dec 26 23:57 converters.hpp
-rw-rw-r-- 1 strike strike 1744387 Dec 26 23:57 qt_binding_linux-gnu-x86_64-qt5.10.cpp
-rw-rw-r-- 1 strike strike 1739876 Dec 26 23:57 qt_binding_linux-gnu-x86_64-qt5.5.cpp
-rw-rw-r-- 1 strike strike 1744614 Dec 26 23:57 qt_binding_linux-gnu-x86_64-qt5.6.cpp
-rw-rw-r-- 1 strike strike 1736471 Dec 26 23:57 qt_binding_linux-gnu-x86_64-qt5.7.cpp
-rw-rw-r-- 1 strike strike 1740045 Dec 26 23:57 qt_binding_linux-gnu-x86_64-qt5.8.cpp
-rw-rw-r-- 1 strike strike 1742412 Dec 26 23:57 qt_binding_linux-gnu-x86_64-qt5.9.cpp
make
in lib/qt5/ext
gives:
$ make
make: *** No rule to make target 'qt_binding_.o', needed by 'binding_.a'. Stop.
when I subst a "linux-gnu-x86_64-qt5.5" in Makefile in BINDING_PLATFORM
because I've have qt5.5 installed, it make
gives:
BINDING_PLATFORM=linux-gnu-x86_64-qt5.5 make
cc -std=c++11 -c -o qt_binding_linux-gnu-x86_64-qt5.5.o qt_binding_linux-gnu-x86_64-qt5.5.cpp -Wall -Werror -Wno-unused-function -fPIC -fno-rtti -I -I.
In file included from qt_binding_linux-gnu-x86_64-qt5.5.cpp:2:0:
converters.hpp:1:31: fatal error: gc/gc.h: No such file or directory
compilation terminated.
Makefile:20: recipe for target 'qt_binding_linux-gnu-x86_64-qt5.5.o' failed
make: *** [qt_binding_linux-gnu-x86_64-qt5.5.o] Error 1
Is there any "refernce" build system for this lib? C++ Qt samples builds normal.
converters.hpp:1:31: fatal error: gc/gc.h: No such file or directory
You're missing libgc-dev
. If something else is also missing, check https://github.com/Papierkorb/bindgen/blob/master/ci/install_debian.sh#L28 for reference
Thanks, I've got "Hello from Crystal/Qt"! :smile:
Need to add libgc-dev
to Ubuntu deps on README page (May be some build checker for Qt and GC libs)
Closing this ticket under the assumption that the errors originally reported were indeed stemming from missing libgc-dev package. The note of needing to install it has since been added to bindgen.
I'm trying to run a sample project using
qt5.cr
:When I do
crystal src/crystal_qt5.cr
(crystal_qt5
is the name of my project), I get an error:I have Qt5 installed on my MacBook, which is running Mac OS X.
(
...
is my user configuration stuff, which is omitted.)