Simple Clion build Problems "Linked Libraries"

已回答

Hi all,

I've a VERY simple program.  It works quite well, but I cannot port it to CLion - to continue the development.  My basic problem is one of getting the CMake file (or something in the system) to accept the link libraries.  (Running under Ubuntu 16.04)

 

My command line compile is:

gcc -o program a_handler.c main.c -lbluetooth

 

It keep telling me that all my bluetooth calls are undefined references.  I understand make files - and have tried everything I could find using the CMake files, but alas, not able to compile.  When I use the tool (walk the definitions) it fines all the code (including the stuff in the bluetooth library).  But during build - something happens.

I'm sure that this is an easy fix - but where to look escapes me.

0

Hi!

Please try using CMakeLists.txt according to SO topic. Does that help?

0
Avatar
Permanently deleted user

Yep - that did the trick.  A bit hard to find this solution.  

0

请先登录再写评论。