Page 1 of 1

Linker problem compiling with Rk libraries using CMakelist.txt

Posted: 2024-12-03 18:45
by robit
Hi,

Building my simple app for Buildroot which uses Rk libraries gives errors at the linking phase.
I referenced the SDK compiled libraries probably not properly.
What is the proper way to reference Rk libraries in CMakelist.txt?

Thanks!


Compiler output:
linking_error.jpg
My CMakelist.txt:
CMakelist.jpg

Re: Linker problem compiling with Rk libraries using CMakelist.txt

Posted: 2024-12-05 1:55
by Crocodile
Hello, you can refer to the CMakelist.txt usage of https://github.com/LuckfoxTECH/luckfox_ ... i_example , the CMakelist.txt you provided is incomplete and I'm not sure if you will use target_link_libraries to link the library to the target

Re: Linker problem compiling with Rk libraries using CMakelist.txt

Posted: 2024-12-05 17:07
by robit
Hi,

"target_link_libraries" was the solution as you pointed out.

Thanks