Closed MarkusIppy closed 4 years ago
You don't need QMAKE_LFLAGS += -static
, if qtbase is compiled statically, it'll automatically compile the Qt programs statically.
Follow the steps to compile a Qt program without without an issue;
qmake
in the directory of the test project and then make
. Your command should look something like this cd /home/username/QmlTestApplication; /home/username/buildroot/output/qt/qt-everywhere-src-*/aaaout/bin/qmake; make
The thing is you need to have all the plugins you used in the .pro file to make them included in the statically compiled binary file. For example, this QTPLUGIN.platforms += qeglfs qxcb qlinuxfb
command makes the binary file include platform plugins inside of the statically compiled binary file.
I follwed the tutorial on your website . I can succesfully compile the image with buildroot . When i try then to compile my programm static i get these two errors .
My .pro file has the following added :+1: QMAKE_LFLAGS += -static
My output fails for linking -lbcm_host and libEGL.so
/home/develop/buildroot/output/host/lib/gcc/arm-buildroot-linux-gnueabihf/7.4.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: cannot find -lbcm_host /home/develop/buildroot/output/host/lib/gcc/arm-buildroot-linux-gnueabihf/7.4.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: attempted static link of dynamic object `/home/develop/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libEGL.so'
Sorry if this might be a very noobish question