remote build fails to see library code.

已回答

I am having issues, I am sure it is something I am doing wrong., I am new to clion and cmake.
Clion 2020.1.1 running on win 10 1909, remote is a Raspberry Pi 4.
The IDE finds the .h and .c files that are in the project,

this is one of the many errors I get.

/usr/bin/ld: CMakeFiles/relay.dir/SRC/relay.c.o: in function `relayChSet':
/tmp/tmp.oRHuYnoFTa/SRC/relay.c:197: undefined reference to `i2cMem8Read'

the `i2cMem8Read' is defined in a .h file and a .c file in the project and that .c file build as a lib (set as a shared lib in cmakefile)

The .h is included in this file causing the error and the CLION sees the available procedures that are defined in the .h file

the errors are in the file that is defined as build executable in cmakefile. it acts like cmake is not passing the lib code to the linker.

I am open to any thoughts

thank you

 

0
Avatar
Permanently deleted user

Anna,

the Linking is what I was missing.

 

thank you

 

0

请先登录再写评论。