Hi!
Hardware is Verdin imx8mm.
Using the newest VS Code and Torizon IDE Extension v2.8.1. (downlaoded today).
App is cmake C++.
Freshly installed both, created a new WSL distribution with Torizon Extension.
Tried this with single container and multi container project, created from Torizon Extension.
Added needed libs for gpio, torizonPackages.json:
{
"prodRuntimeDeps": [
"libgpiod2"
],
"devRuntimeDeps": [
"libgpiod2",
"libgpiod-dev",
"build-essential",
"pkg-config"
],
"buildDeps": [
]
}
Dockerfile.debug has them:
# automate for torizonPackages.json
RUN apt-get -q -y update && \
apt-get -q -y install \
# DO NOT REMOVE THIS LABEL: this is used for VS Code automation
# __torizon_packages_dev_start__
libgpiod-dev:arm64 \
build-essential:arm64 \
pkg-config:arm64 \
# __torizon_packages_dev_end__
# DO NOT REMOVE THIS LABEL: this is used for VS Code automation
&& \
apt-get clean && apt-get autoremove && \
rm -rf /var/lib/apt/lists/*
#include <gpiod.h> is missing.
Code can’t compile, this is my main.c:
#include <iostream>
#include <gpiod.h>
int main() {
std::cout << "Hello Torizon!" << std::endl;
return 0;
}
– Configuring done
– Generating done
– Build files have been written to: /home/torizon/app/build-arm64
-
- Terminal will be reused by tasks, press any key to close it. *
-
- Executing task in folder Embedded: DOCKER_HOST= docker run --rm -v /home/mb/FedMultiContrainerTest/Embedded:/home/torizon/app cross-toolchain-arm64-embedded cmake --build build-arm64 *
[ 50%] Building CXX object CMakeFiles/Embedded.dir/src/main.cpp.o
/home/torizon/app/src/main.cpp:2:10: fatal error: user/include/gpiod.h: No such file or directory
- 2 | #include <user/include/gpiod.h>*
-
| ^~~~~~~~~~~~~~~~~~~~~~*
compilation terminated.
gmake[2]: *** [CMakeFiles/Embedded.dir/build.make:76: CMakeFiles/Embedded.dir/src/main.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/Embedded.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
exit status 2
Is there anything else I must do or setup for a cmake C++ application?
Thank you!
Br,
Mladen