Remote compilation on raspi with cmake - undefined reference
Answered
Hello, I am trying to remotely compile on my raspi running raspbian. I am trying to use functions from libserialport.h located in REMOTE/usr/include.

It fails, even though the program says it can see the functions.

Please sign in to leave a comment.
Hello! Do you build your remote run/denug configuration or the local one?
Please go to Help | Debug Log Settings, add #com.jetbrains.cidr.remote there, reproduce the issue, collect logs from Help | Show Log in <File Manager> and send them to clion-support at jetbrains.com. Note that logs might contain private user's information (like file paths and names).
Hello, I am trying to build on the remote.
It seems you need to link your executable to the serial port library. Here is the instruction of how to include a library into a CMake project: https://www.jetbrains.com/help/clion/quick-cmake-tutorial.html#libs.
Hello,
Thank you very much for your help. After reading through Cmake once again i understood where the problem was. For anyone running into similar problem in the future, I am including the working makefile: