I am using Netbeans to cross-compile C++ code for raspberry pi with arm-linux-gnueabihf-raspbian. Compiling works fine and I am able to run programs on raspberry but I can't figure out how to add external library files such as RF24 or WiringPi.
According some sources I should create a configure file to install libraries to toolchain but being a newbie to linux, I have no idea how. What should I do?
Thank you, that solved one part of the problem. What I needed to do was to install libraries normally to raspberry pi and then copy the just installed library files from pi#:/usr/local/lib to project folder at local computer and then do as you said. Now everything seems to be working.
Related
I'm working in a project which uses ROS and WebRTC.
To build both libraries, I have to define "WEBRTC_POSIX" and "_GLIBCXX_USE_CXX11_ABI=0".
However, when I add "_GLIB_CXX_USE_CXX11_ABI=0" definition to compiler, I get unsatisfied link errors from ROS.
I'm using Ubuntu 17.04, ROS Lunar, g++ 6.3 and cmake 3.7.2
Is there any trouble with ROS and std=c++11?
I had this same issue. Ultimately what I found is that you probably need to use Ubuntu 14.04 and ROS Indigo to have to compile cleanly. The ROS comms don't change too often, so you may be able to run this node on a separate PC or VM.
I tried to make it work, but ultimately you have to build all of ROS and replace a lot of the Ubuntu system libraries with custom built versions that have the flag set.
I made it as far as a ROS source install + a custom Boost version. I gave up when I had to add Log4Cxx. If I remember correctly, there's a few other dependencies too that you'd need to compile.
I tried to deploy a qt application using the shared library approach described here: http://doc.qt.io/qt-5/linux-deployment.html (5th headline)
When I go to my project folder and type "make clean" I get this error: "make: *** No rule ro make target 'clean'. Stop"
What is the problem here?
Also: The documentation states: "We assume that you already have installed Qt as a shared library, which is the default when installing Qt, in the /path/to/Qt directory."
How can I check if I installed Qt as a shared library?
I wrote the application in C++ using the Qt Creator on a Raspberry Pi 2 with Raspbian Jessie. I want to deploy it so I can use it on another Raspberry that has minimal functionality without desktop-gui or qtcreator installed. I am using Raspbian Jessie Lite on that one.
Before running make you should have Makefile there. If you don't, run qmake to generate one. If qmake fails, you've done something really wrong with .pro file.
I'm developing a c++ app in Ubuntu Desktop 16.04. I have created an executable c++ file with eclipse. Furthermore I'm using external libraries like poco and avro which I link dynamically. I need to try my app on a cubietruck that runs on Lubuntu Desktop 12.10. My approach it to install only the desired g++ compiler on Lubuntu because I want to install as less as possible on the board. Then to transfer there the same folder structure which resides in Ubuntu that contains the executable file as well as the external libraries'.so files and its headers. Since I have almost no experience in boards and transfer between linux distro's is my approach an efficient one?
I think the main problem is the different architecture. Your board is ARM while your Desktop is x86. Your application needs to be compiled on the board. Also you need to get the library files for arm.
Recently, I got a new raspberry pi, and I want to use Eclipse on Windows with MinGW compiler to build c++ codes and run them on the raspberry pi. Is there any way to do that?
You need Cross-Compilation. When you create a project you need to Select the Cross GCC Toolchain and you need to set the Cross compile prefix to: "arm-linux-gnueabihf-"
Tutorial
I have written a code that runs successfully on a ubuntu machine having Qt installed but when I'm trying to run the executable on another ubuntu machine that don't have Qt I am getting this error:
error while loading shared libraries: libQt5Widgets.so.5
Since you have a shared build, you need the required shared Qt libraries on your system.
Alternatively if you want to build a standalone executable then you will have to compile it statically.
Following link maybe helpful:
How to make binary distribution of Qt application for Linux
As is clear, the required Qt libraries are not installed on the other machine, you will need to install Qt libraries first.
The standard procedure followed on Linux, is to create a package (Debian, rpm, pacman etc.) Since you are using Ubuntu, you should create a Debian package with libqt5gui5 mentioned as dependency, so when you install the package, Qt libraries are automatically downloaded and installed if necessary.