Error: undefined reference to `libcamera::Camera::generateConfiguration(... when cross-compiling

Hi, so I only get this error when i try to cross-compile my qt apps for my RPI. If i comment out this line then the cross-compilation works - this means other libcamera methods used dont give this error. I think there has been an update of libcamera from 0.4 to 0.5x cause i didnt have such problem before.

17:03:37: Starting: "/usr/bin/make" -j4
/root/rpi-qt/qt5.15/bin/qmake -o Makefile ../ip-camera/ip-camera.pro -spec devices/linux-rasp-pi4-v3d-g++ CONFIG+=debug CONFIG+=qml_debug
/root/rpi-qt/tools/cross-pi-gcc-10.3.0-2/bin/arm-linux-gnueabihf-g++ -c -march=armv8-a -mtune=cortex-a72 -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard --sysroot=/root/rpi-qt/sysroot/ -g -std=gnu++1z -Wall -Wextra -D_REENTRANT -fPIC -DQT_QML_DEBUG -DQT_NO_KEYWORDS -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I../ip-camera -I. -I/usr/local/include/libcamera -I/usr/include/event2 -I/root/rpi-qt/qt5.15/include -I/root/rpi-qt/qt5.15/include/QtWidgets -I/root/rpi-qt/qt5.15/include/QtGui -I/root/rpi-qt/qt5.15/include/QtNetwork -I/root/rpi-qt/qt5.15/include/QtCore -I. -I/root/rpi-qt/qt5.15/mkspecs/devices/linux-rasp-pi4-v3d-g++ -o main.o ../ip-camera/main.cpp
/root/rpi-qt/tools/cross-pi-gcc-10.3.0-2/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=/root/rpi-qt/sysroot/ -Wl,-rpath,/usr/local/qt5.15/lib -Wl,-rpath-link,/root/rpi-qt/sysroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/root/rpi-qt/sysroot/lib/arm-linux-gnueabihf -o ipcam main.o LibCamera.o   -lstdc++ -lcamera -levent_pthreads -lcamera-base /root/rpi-qt/qt5.15/lib/libQt5Widgets.so /root/rpi-qt/qt5.15/lib/libQt5Gui.so /root/rpi-qt/qt5.15/lib/libQt5Network.so /root/rpi-qt/qt5.15/lib/libQt5Core.so -L/root/rpi-qt/sysroot//usr/lib/arm-linux-gnueabihf -lGLESv2 -lpthread   
/root/rpi-qt/tools/cross-pi-gcc-10.3.0-2/bin/../lib/gcc/arm-linux-gnueabihf/10.3.1/../../../../arm-linux-gnueabihf/bin/ld: LibCamera.o: in function `LibCamera::configureStill(int, int, libcamera::PixelFormat, int, int)':
/home/devasus/Desktop/build-ip-camera-PI1-Debug/../ip-camera/LibCamera.cpp:30: undefined reference to `libcamera::Camera::generateConfiguration(std::vector<libcamera::StreamRole, std::allocator<libcamera::StreamRole> > const&)'
collect2: error: ld returned 1 exit status
make: *** [Makefile:267: ipcam] Error 1
17:03:43: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project ip-camera (kit: PI1)
When executing step "Make"

When compile same project directly on my RPI i dont get this error either on that line.

pi@pi1:~/ip-camera/build $ make
g++ -c -pipe -O2 -std=gnu++1z -Wall -Wextra -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_NO_KEYWORDS -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I../../ip-camera -I. -I/usr/local/include/libcamera -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/QtNetwork -I/usr/include/arm-linux-gnueabihf/qt5/QtCore -I. -I/usr/lib/arm-linux-gnueabihf/qt5/mkspecs/linux-g++ -o main.o ../main.cpp
g++ -c -pipe -O2 -std=gnu++1z -Wall -Wextra -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_NO_KEYWORDS -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I../../ip-camera -I. -I/usr/local/include/libcamera -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/QtNetwork -I/usr/include/arm-linux-gnueabihf/qt5/QtCore -I. -I/usr/lib/arm-linux-gnueabihf/qt5/mkspecs/linux-g++ -o LibCamera.o ../LibCamera.cpp
g++ -Wl,-O1 -o ip-camera main.o LibCamera.o   -lcamera -lcamera-base /usr/lib/arm-linux-gnueabihf/libQt5Widgets.so /usr/lib/arm-linux-gnueabihf/libQt5Gui.so /usr/lib/arm-linux-gnueabihf/libQt5Network.so /usr/lib/arm-linux-gnueabihf/libQt5Core.so -lGLESv2 -lpthread -latomic   
pi@pi1:~/ip-camera/build $ 

I use this cross-compilation setup:

https://www.interelectronix.com/qt-cross-compile-setup-scripts-raspberry-pi-4.html
https://www.interelectronix.com/configuring-qt-creator-ubuntu-20-lts-cross-compilation.html

Any ideas how to solve this linker error?

@henri

Have you updated libcamera.
Please take a look at the libcamera version

dpkg -l | grep libcamera

devasus@devasus:~/Desktop$ ssh [email protected]
pi@pi1:~ $ dpkg -l | grep libcamera
ii  libcamera-apps                         1.2.1-1                          armhf        libcamera-apps
ii  libcamera-dev:armhf                    0~git20230724+ad9428b4-1         armhf        complex camera support library (development files)
ii  libcamera0:armhf                       0~git20230724+ad9428b4-1         armhf        complex camera support library
ii  python3-libcamera                      0~git20230720+bde9b04f-1         armhf        complex camera support library (Python 3 bindings)

Some more stuff for info

PI:

pi@pi1:/lib/arm-linux-gnueabihf $ ls -la | grep libcamera
drwxr-xr-x  2 root root     4096 Sep  7 15:16 libcamera
lrwxrwxrwx  1 root root       21 Jul 24 08:56 libcamera-base.so -> libcamera-base.so.0.0
lrwxrwxrwx  1 root root       23 Jul 24 08:56 libcamera-base.so.0.0 -> libcamera-base.so.0.0.5
-rw-r--r--  1 root root   124504 Jul 24 08:56 libcamera-base.so.0.0.5
lrwxrwxrwx  1 root root       16 Jul 24 08:56 libcamera.so -> libcamera.so.0.0
lrwxrwxrwx  1 root root       18 Jul 24 08:56 libcamera.so.0.0 -> libcamera.so.0.0.5
-rw-r--r--  1 root root  1281848 Jul 24 08:56 libcamera.so.0.0.5
lrwxrwxrwx  1 root root       22 Jul 17 10:21 libcamera_app.so -> libcamera_app.so.1.2.1
-rw-r--r--  1 root root   632416 Jul 17 10:21 libcamera_app.so.1.2.1
pi@pi1:/usr/lib/arm-linux-gnueabihf $ ls -la | grep libcamera
drwxr-xr-x  2 root root     4096 Sep  7 15:16 libcamera
lrwxrwxrwx  1 root root       21 Jul 24 08:56 libcamera-base.so -> libcamera-base.so.0.0
lrwxrwxrwx  1 root root       23 Jul 24 08:56 libcamera-base.so.0.0 -> libcamera-base.so.0.0.5
-rw-r--r--  1 root root   124504 Jul 24 08:56 libcamera-base.so.0.0.5
lrwxrwxrwx  1 root root       16 Jul 24 08:56 libcamera.so -> libcamera.so.0.0
lrwxrwxrwx  1 root root       18 Jul 24 08:56 libcamera.so.0.0 -> libcamera.so.0.0.5
-rw-r--r--  1 root root  1281848 Jul 24 08:56 libcamera.so.0.0.5
lrwxrwxrwx  1 root root       22 Jul 17 10:21 libcamera_app.so -> libcamera_app.so.1.2.1
-rw-r--r--  1 root root   632416 Jul 17 10:21 libcamera_app.so.1.2.1
pi@pi1:/usr/local/lib/arm-linux-gnueabihf $ ls
gstreamer-1.0  libcamera  libcamera-base.so  libcamera-base.so.0.0  libcamera-base.so.0.0.5  libcamera.so  libcamera.so.0.0  libcamera.so.0.0.5  pkgconfig
pi@pi1:/usr/local/lib/arm-linux-gnueabihf/libcamera $ sudo find / -type f -name "*libcamera.so*"
/usr/local/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstlibcamera.so
/usr/local/lib/arm-linux-gnueabihf/libcamera.so.0.0.5
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstlibcamera.so
/usr/lib/arm-linux-gnueabihf/libcamera.so.0.0.5

dev PC for cross compile

root@devasus:~/rpi-qt/sysroot/lib/arm-linux-gnueabihf# ls -la | grep libcamera
drwxr-xr-x  2 root root     4096 sept   7 15:16 libcamera
lrwxrwxrwx  1 root root       22 juuli 17 10:21 libcamera_app.so -> libcamera_app.so.1.2.1
-rw-r--r--  1 root root   632416 juuli 17 10:21 libcamera_app.so.1.2.1
lrwxrwxrwx  1 root root       21 juuli 24 08:56 libcamera-base.so -> libcamera-base.so.0.0
lrwxrwxrwx  1 root root       23 juuli 24 08:56 libcamera-base.so.0.0 -> libcamera-base.so.0.0.5
-rw-r--r--  1 root root   124504 juuli 24 08:56 libcamera-base.so.0.0.5
lrwxrwxrwx  1 root root       16 juuli 24 08:56 libcamera.so -> libcamera.so.0.0
lrwxrwxrwx  1 root root       18 juuli 24 08:56 libcamera.so.0.0 -> libcamera.so.0.0.5
-rw-r--r--  1 root root  1281848 juuli 24 08:56 libcamera.so.0.0.5
root@devasus:~/rpi-qt/sysroot/usr/lib/arm-linux-gnueabihf# ls -la | grep libcamera
drwxr-xr-x  2 root root     4096 sept   7 15:16 libcamera
lrwxrwxrwx  1 root root       22 juuli 17 10:21 libcamera_app.so -> libcamera_app.so.1.2.1
-rw-r--r--  1 root root   632416 juuli 17 10:21 libcamera_app.so.1.2.1
lrwxrwxrwx  1 root root       21 juuli 24 08:56 libcamera-base.so -> libcamera-base.so.0.0
lrwxrwxrwx  1 root root       23 juuli 24 08:56 libcamera-base.so.0.0 -> libcamera-base.so.0.0.5
-rw-r--r--  1 root root   124504 juuli 24 08:56 libcamera-base.so.0.0.5
lrwxrwxrwx  1 root root       16 juuli 24 08:56 libcamera.so -> libcamera.so.0.0
lrwxrwxrwx  1 root root       18 juuli 24 08:56 libcamera.so.0.0 -> libcamera.so.0.0.5
-rw-r--r--  1 root root  1281848 juuli 24 08:56 libcamera.so.0.0.5
root@devasus:~/rpi-qt/sysroot/usr/local/lib/arm-linux-gnueabihf# ls
gstreamer-1.0  libcamera  libcamera-base.so  libcamera-base.so.0.0  libcamera-base.so.0.0.5  libcamera.so  libcamera.so.0.0  libcamera.so.0.0.5  pkgconfig

my qmake file:

TEMPLATE = app
CONFIG += c++17
QT += core network gui widgets
CONFIG += no_keywords
TARGET = ipcam

# Point your PKG_CONFIG_PATH environment variable to the
# libcamera install path libcamera.pc file ($prefix/lib/pkgconfig/libcamera.pc)
LIBS += -lstdc++
LIBS += -lcamera
LIBS += -levent_pthreads
LIBS += -lcamera-base

# Define the include directories for the external libraries
INCLUDEPATH += /usr/local/include/libcamera
INCLUDEPATH += /usr/include/event2

SOURCES += main.cpp \
    LibCamera.cpp

HEADERS += \
    LibCamera.h

target.path = /home/pi/
INSTALLS += target

The code itself basically modified version of Edwards libcamera-cpp-demo.

Is it problem that since i have libcamera installed in different locations when i cross compile different libcamera library files are used than when I compile locally on PI?

pi@pi1:/lib/arm-linux-gnueabihf $ nm -D libcamera.so.0.0.5 | grep "generateConfiguration"
001103c8 T _ZN9libcamera18PipelineHandlerUVC21generateConfigurationEPNS_6CameraENS_4SpanIKNS_10StreamRoleELj4294967295EEE
00115b70 T _ZN9libcamera19PipelineHandlerVimc21generateConfigurationEPNS_6CameraENS_4SpanIKNS_10StreamRoleELj4294967295EEE
001089d4 T _ZN9libcamera21SimplePipelineHandler21generateConfigurationEPNS_6CameraENS_4SpanIKNS_10StreamRoleELj4294967295EEE
000f6190 T _ZN9libcamera3RPi19PipelineHandlerBase21generateConfigurationEPNS_6CameraENS_4SpanIKNS_10StreamRoleELj4294967295EEE
0007f69c T _ZN9libcamera6Camera21generateConfigurationENS_4SpanIKNS_10StreamRoleELj4294967295EEE
pi@pi1:/lib/arm-linux-gnueabihf $ cd ../../
pi@pi1:/ $ cd usr/lib/arm-linux-gnueabihf/
pi@pi1:/usr/lib/arm-linux-gnueabihf $ nm -D libcamera.so.0.0.5 | grep "generateConfiguration"
001103c8 T _ZN9libcamera18PipelineHandlerUVC21generateConfigurationEPNS_6CameraENS_4SpanIKNS_10StreamRoleELj4294967295EEE
00115b70 T _ZN9libcamera19PipelineHandlerVimc21generateConfigurationEPNS_6CameraENS_4SpanIKNS_10StreamRoleELj4294967295EEE
001089d4 T _ZN9libcamera21SimplePipelineHandler21generateConfigurationEPNS_6CameraENS_4SpanIKNS_10StreamRoleELj4294967295EEE
000f6190 T _ZN9libcamera3RPi19PipelineHandlerBase21generateConfigurationEPNS_6CameraENS_4SpanIKNS_10StreamRoleELj4294967295EEE
0007f69c T _ZN9libcamera6Camera21generateConfigurationENS_4SpanIKNS_10StreamRoleELj4294967295EEE
pi@pi1:/usr/lib/arm-linux-gnueabihf $ cd /usr/local/lib/arm-linux-gnueabihf/
pi@pi1:/usr/local/lib/arm-linux-gnueabihf $ nm -D libcamera.so.0.0.5 | grep "generateConfiguration"
0052dbac T _ZN9libcamera10RkISP1Path21generateConfigurationEPKNS_12CameraSensorERKNS_4SizeENS_10StreamRoleE
005071e0 T _ZN9libcamera18PipelineHandlerISI21generateConfigurationEPNS_6CameraENS_4SpanIKNS_10StreamRoleELj4294967295EEE
00589760 T _ZN9libcamera18PipelineHandlerUVC21generateConfigurationEPNS_6CameraENS_4SpanIKNS_10StreamRoleELj4294967295EEE
0051ade4 T _ZN9libcamera21PipelineHandlerRkISP121generateConfigurationEPNS_6CameraENS_4SpanIKNS_10StreamRoleELj4294967295EEE
00567958 T _ZN9libcamera21SimplePipelineHandler21generateConfigurationEPNS_6CameraENS_4SpanIKNS_10StreamRoleELj4294967295EEE
00537bc0 T _ZN9libcamera3RPi19PipelineHandlerBase21generateConfigurationEPNS_6CameraENS_4SpanIKNS_10StreamRoleELj4294967295EEE
003d90a0 T _ZN9libcamera6Camera21generateConfigurationENS_4SpanIKNS_10StreamRoleELj4294967295EEE

Ok so these are the files that are used when i compile locally with either cmake or qmake

pi@pi1:~/libcamera-cpp-demo/build $ cmake ..
-- /usr/local/include/libcamera
-- /usr/local/lib/arm-linux-gnueabihf/libcamera.so
-- /usr/local/lib/arm-linux-gnueabihf/libcamera-base.so
Found OpenCV
Includes:/usr/include/opencv4
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/libcamera-cpp-demo/build

i dont know how to make sure which folder is used when i cross compile with qmake

I deleted all the libcamera.so and libcamera-base.so files from ~/rpi-qt/sysroot/lib. All the libcamera files from ~/rpi-qt/sysroot/usr/lib also disappeared with that move so i quess they were just symlinks then. Now i get new error when cross compling:

/root/rpi-qt/tools/cross-pi-gcc-10.3.0-2/bin/../lib/gcc/arm-linux-gnueabihf/10.3.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lcamera
/root/rpi-qt/tools/cross-pi-gcc-10.3.0-2/bin/../lib/gcc/arm-linux-gnueabihf/10.3.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lcamera-base
tried spicifying the path in qmake pro file but that didnt work

LIBS += -L/usr/local/lib/arm-linux-gnueabihf/ -lcamera
LIBS += -L/usr/local/lib/arm-linux-gnueabihf/ -lcamera-base

It seems that it is still trying to look for the files from the /lib/arm-linux-gnu… or /usr/lib/arm-linux-gnu… folders and is not searching the libraries from the /usr/local/lib/arm-linux-gnu…

/root/rpi-qt/tools/cross-pi-gcc-10.3.0-2/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=/root/rpi-qt/sysroot/ -Wl,-rpath,/usr/local/qt5.15/lib -Wl,-rpath-link,/root/rpi-qt/sysroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/root/rpi-qt/sysroot/lib/arm-linux-gnueabihf -o ipcam main.o LibCamera.o   -lstdc++ -L/usr/local/lib/arm-linux-gnueabihf/ -lcamera -levent_pthreads -lcamera-base /root/rpi-qt/qt5.15/lib/libQt5Widgets.so /root/rpi-qt/qt5.15/lib/libQt5Gui.so /root/rpi-qt/qt5.15/lib/libQt5Network.so /root/rpi-qt/qt5.15/lib/libQt5Core.so -L/root/rpi-qt/sysroot//usr/lib/arm-linux-gnueabihf -lGLESv2 -lpthread  

How to fix this?

Copied entire text from last post to chatgpt who told me to do the following:

Add the custom library paths to the library search paths

QMAKE_LFLAGS += -Wl,-rpath-link,/usr/local/lib/arm-linux-gnueabihf/

Specify the libraries with their full paths

LIBS += -L/usr/local/lib/arm-linux-gnueabihf/ -lcamera -lcamera-base

I did it but still got the same error.

/root/rpi-qt/tools/cross-pi-gcc-10.3.0-2/bin/../lib/gcc/arm-linux-gnueabihf/10.3.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lcamera
/root/rpi-qt/tools/cross-pi-gcc-10.3.0-2/bin/../lib/gcc/arm-linux-gnueabihf/10.3.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lcamera-base

Then i changed it to

LIBS += -L/root/rpi-qt/sysroot/usr/local/lib/arm-linux-gnueabihf/ -lcamera -lcamera-base

Rebuilt and got back to the original error:

18:10:14: Running steps for project ip-camera...
18:10:14: Starting: "/usr/bin/make" clean -j4
/root/rpi-qt/qt5.15/bin/qmake -o Makefile ../ip-camera/ip-camera.pro -spec devices/linux-rasp-pi4-v3d-g++ CONFIG+=debug CONFIG+=qml_debug
rm -f moc_predefs.h
rm -f main.o LibCamera.o
rm -f *~ core *.core
18:10:14: The process "/usr/bin/make" exited normally.
18:10:14: Starting: "/root/rpi-qt/qt5.15/bin/qmake" /home/devasus/Desktop/ip-camera/ip-camera.pro -spec devices/linux-rasp-pi4-v3d-g++ CONFIG+=debug CONFIG+=qml_debug
18:10:14: The process "/root/rpi-qt/qt5.15/bin/qmake" exited normally.
18:10:14: Starting: "/usr/bin/make" -f /home/devasus/Desktop/build-ip-camera-PI1-Debug/Makefile qmake_all
make: Nothing to be done for 'qmake_all'.
18:10:14: The process "/usr/bin/make" exited normally.
18:10:14: Starting: "/usr/bin/make" -j4
/root/rpi-qt/tools/cross-pi-gcc-10.3.0-2/bin/arm-linux-gnueabihf-g++ -c -march=armv8-a -mtune=cortex-a72 -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard --sysroot=/root/rpi-qt/sysroot/ -g -std=gnu++1z -Wall -Wextra -D_REENTRANT -fPIC -DQT_QML_DEBUG -DQT_NO_KEYWORDS -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I../ip-camera -I. -I/usr/local/include/libcamera -I/usr/include/event2 -I/root/rpi-qt/qt5.15/include -I/root/rpi-qt/qt5.15/include/QtWidgets -I/root/rpi-qt/qt5.15/include/QtGui -I/root/rpi-qt/qt5.15/include/QtNetwork -I/root/rpi-qt/qt5.15/include/QtCore -I. -I/root/rpi-qt/qt5.15/mkspecs/devices/linux-rasp-pi4-v3d-g++ -o main.o ../ip-camera/main.cpp
/root/rpi-qt/tools/cross-pi-gcc-10.3.0-2/bin/arm-linux-gnueabihf-g++ -c -march=armv8-a -mtune=cortex-a72 -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard --sysroot=/root/rpi-qt/sysroot/ -g -std=gnu++1z -Wall -Wextra -D_REENTRANT -fPIC -DQT_QML_DEBUG -DQT_NO_KEYWORDS -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I../ip-camera -I. -I/usr/local/include/libcamera -I/usr/include/event2 -I/root/rpi-qt/qt5.15/include -I/root/rpi-qt/qt5.15/include/QtWidgets -I/root/rpi-qt/qt5.15/include/QtGui -I/root/rpi-qt/qt5.15/include/QtNetwork -I/root/rpi-qt/qt5.15/include/QtCore -I. -I/root/rpi-qt/qt5.15/mkspecs/devices/linux-rasp-pi4-v3d-g++ -o LibCamera.o ../ip-camera/LibCamera.cpp
/root/rpi-qt/tools/cross-pi-gcc-10.3.0-2/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=/root/rpi-qt/sysroot/ -Wl,-rpath-link,/root/rpi-qt/sysroot/usr/local/lib/arm-linux-gnueabihf/ -Wl,-rpath,/usr/local/qt5.15/lib -Wl,-rpath-link,/root/rpi-qt/sysroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/root/rpi-qt/sysroot/lib/arm-linux-gnueabihf -o ipcam main.o LibCamera.o   -lstdc++ -L/root/rpi-qt/sysroot/usr/local/lib/arm-linux-gnueabihf/ -lcamera -lcamera-base -levent_pthreads /root/rpi-qt/qt5.15/lib/libQt5Widgets.so /root/rpi-qt/qt5.15/lib/libQt5Gui.so /root/rpi-qt/qt5.15/lib/libQt5Network.so /root/rpi-qt/qt5.15/lib/libQt5Core.so -L/root/rpi-qt/sysroot//usr/lib/arm-linux-gnueabihf -lGLESv2 -lpthread   
/root/rpi-qt/tools/cross-pi-gcc-10.3.0-2/bin/../lib/gcc/arm-linux-gnueabihf/10.3.1/../../../../arm-linux-gnueabihf/bin/ld: LibCamera.o: in function `LibCamera::configureStill(int, int, libcamera::PixelFormat, int, int)':
/home/devasus/Desktop/build-ip-camera-PI1-Debug/../ip-camera/LibCamera.cpp:30: undefined reference to `libcamera::Camera::generateConfiguration(std::vector<libcamera::StreamRole, std::allocator<libcamera::StreamRole> > const&)'
collect2: error: ld returned 1 exit status
make: *** [Makefile:267: ipcam] Error 1
18:10:19: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project ip-camera (kit: PI1)
When executing step "Make"
18:10:19: Elapsed time: 00:05.

Cross-compiler issue maybe?

Makefile when i build locally and i dont get that error not finding “generateConfiguration”:
https://jpst.it/3oi_U

Makefile when i cross compile and get the error
https://jpst.it/3oi_6

or maybe somebody here can point me to some linux dev forum where i could post this question?