ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  helloworld comfile on the raspberry pi with Qt
Posted by dennis.kim on Nov-23-2022 12:36
I downloaded of linux sample code(64-bit ARM) from the site below.
https://www.advsofteng.com/download.html


When I try to compile , I get an error as below.


----------------------------------------------------------------------------------------------------------------------
pi@raspberrypi:~/chardir_linux/ChartDirector_linux_arm64/qtdemo/helloworld $ sudo make -j4
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DCHARTDIR_HIDE_OBSOLETE -D_CRT_SECURE_NO_WARNINGS -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I../../include -isystem /usr/include/arm-linux-gnueabihf/qt5 -isystem /usr/include/arm-linux-gnueabihf/qt5/QtWidgets -isystem /usr/include/arm-linux-gnueabihf/qt5/QtGui -isystem /usr/include/arm-linux-gnueabihf/qt5/QtCore -I. -I/usr/lib/arm-linux-gnueabihf/qt5/mkspecs/linux-g++ -o qchartviewer.o qchartviewer.cpp
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DCHARTDIR_HIDE_OBSOLETE -D_CRT_SECURE_NO_WARNINGS -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I../../include -isystem /usr/include/arm-linux-gnueabihf/qt5 -isystem /usr/include/arm-linux-gnueabihf/qt5/QtWidgets -isystem /usr/include/arm-linux-gnueabihf/qt5/QtGui -isystem /usr/include/arm-linux-gnueabihf/qt5/QtCore -I. -I/usr/lib/arm-linux-gnueabihf/qt5/mkspecs/linux-g++ -o helloworld.o helloworld.cpp
g++ -pipe -O2 -Wall -W -dM -E -o moc_predefs.h /usr/lib/arm-linux-gnueabihf/qt5/mkspecs/features/data/dummy.cpp
/usr/lib/qt5/bin/moc -DCHARTDIR_HIDE_OBSOLETE -D_CRT_SECURE_NO_WARNINGS -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB --include /home/pi/chardir_linux/ChartDirector_linux_arm64/qtdemo/helloworld/moc_predefs.h -I/usr/lib/arm-linux-gnueabihf/qt5/mkspecs/linux-g++ -I/home/pi/chardir_linux/ChartDirector_linux_arm64/qtdemo/helloworld -I/home/pi/chardir_linux/ChartDirector_linux_arm64/include -I/usr/include/arm-linux-gnueabihf/qt5 -I/usr/include/arm-linux-gnueabihf/qt5/QtWidgets -I/usr/include/arm-linux-gnueabihf/qt5/QtGui -I/usr/include/arm-linux-gnueabihf/qt5/QtCore -I/usr/include/c++/8 -I/usr/include/arm-linux-gnueabihf/c++/8 -I/usr/include/c++/8/backward -I/usr/lib/gcc/arm-linux-gnueabihf/8/include -I/usr/local/include -I/usr/lib/gcc/arm-linux-gnueabihf/8/include-fixed -I/usr/include/arm-linux-gnueabihf -I/usr/include qchartviewer.h -o moc_qchartviewer.cpp
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DCHARTDIR_HIDE_OBSOLETE -D_CRT_SECURE_NO_WARNINGS -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I../../include -isystem /usr/include/arm-linux-gnueabihf/qt5 -isystem /usr/include/arm-linux-gnueabihf/qt5/QtWidgets -isystem /usr/include/arm-linux-gnueabihf/qt5/QtGui -isystem /usr/include/arm-linux-gnueabihf/qt5/QtCore -I. -I/usr/lib/arm-linux-gnueabihf/qt5/mkspecs/linux-g++ -o moc_qchartviewer.o moc_qchartviewer.cpp
g++ -Wl,-O1 -Wl,-z,origin -Wl,-rpath,$ORIGIN/../../lib -o helloworld qchartviewer.o helloworld.o moc_qchartviewer.o   -L../../lib -lchartdir -lQt5Widgets -lQt5Gui -lQt5Core -lGLESv2 -lpthread -latomic
../../lib/libchartdir.so: file not recognized: file format not recognized
collect2: error: ld returned 1 exit status
make: *** [Makefile:147: helloworld] 오류 1
pi@raspberrypi:~/chardir_linux/ChartDirector_linux_arm64/qtdemo/helloworld $ uname -a
Linux raspberrypi 5.10.63-v7+ #1459 SMP Wed Oct 6 16:41:10 BST 2021 armv7l GNU/Linux
----------------------------------------------------------------------------------------------------------------------


Please tell me how can I compile on raspberry pi.

  Re: helloworld comfile on the raspberry pi with Qt
Posted by Peter Kwan on Nov-23-2022 21:57
Hi Dennis,

According to the "uname":

Linux raspberrypi 5.10.63-v7+ #1459 SMP Wed Oct 6 16:41:10 BST 2021 armv7l GNU/Linux

Your Linux architecture is "armv7l", which is 32-bit. It cannot support 64-bit shared objects.

For your case, there are two options:

(a) If you are using Raspberry Pi 3 or later, you can install 64-bit Linux instead. See:

https://www.raspberrypi.com/news/raspberry-pi-os-64-bit/

or

(b) If you want to use your existing 32-bit Linux, you may use the 32-bit ARM edition of ChartDirector. Note that they are non-supported releases.

https://www.chartdir.com/forum/download_thread.php?bn=chartdir_support&thread=1619420755

(In the past, we did not official supported the ARM CPU. Because many of our customers asked for ARM support, so we created some custom builds as in the above link. Starting from Apr 11, 2022, we officially support ARM 64-bit, so put 64-bit build on our download page.)

Best Regards
Peter Kwan

  Re: helloworld comfile on the raspberry pi with Qt
Posted by dennis.kim on Nov-25-2022 10:06
Thank you Peter.

The build was successful through the linux_armhf code you shared.