![]() Instead, you'll use cmake -install to letĬMake install all the necessary files into a so-called staging directory on That's it, you have successfully executed your cross-compiled C++ program on the Raspberry Pi!įor larger projects, you usually don't want to have to dig around in theīuild directory to gather all the files you need to copy to the (using the Ctrl+K+O shortcut or “Open Folder”). Open the ~/GitHub/RPi-Cross-Cpp-Development folder in Visual Studio Code Ssh RPi0 sudo apt install -y libboost-program-options1.67.0 Configuring and building the project Time and space, you could install just the libraries you need, e.g. Strictly speaking, we don't need all development libraries on the Pi, so to save some ![]() Ssh RPi0 sudo apt install -y libboost-all-dev Let's do that now, using the standard apt install command over SSH: Now Boost is installed on our build computer, but not yet on the Raspberry Pi itself. Sudo sbuild-apt rpizero-buster-armhf apt-get install libboost-all-dev Using the familiar apt-get install command.Īnd specify the name of the root filesystem we created on the previous page. Really easy, you can just install them to the Raspberry Pi OS root filesystem Thanks to the sbuild development tools, managing dependencies is If you're using a 64-bit toolchain, edit theĪarch64-rpi3-linux-gnu.cmake file instead. You might want to change the toolchain prefix or the architecture-specific flags Sed -i 's/schroot-name/rpizero-buster/' cmake/armv6-rpi-linux-gnueabihf.cmake (the value of the CMAKE_SYSROOT variable): Mkdir -p ~/GitHub cd ~/GitHub git clone cd RPi-Cross-Cpp-Development Customize the pathsĮdit the CMake toolchain file to point to the correct root filesystem path The example is just a command line program that asks the user for his/her
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |