Phone & Wearable share the same (external) c code?

Phone & Wearable share the same (external) c code?

BY 09 Nov 2017 Native Application Development

Hi,

I have developed an audio app which can play/record sounds on Tizen 3.0 (wearable). Now I want to port this app to the Tizen phone but I am not sure how to make both projects share the same piece of c code (e.g., the core logic to process and play audio). 

My project now looks like:

Wearable

-inc/

       – app.h

       – libas.h 

– src/

       – app.c

       – libas.c

Where app.c/h are just the wearable UI and the libas.c/h includes the core logic. It is hard for me to build libas.c/h as a static library because it also uses the Tizen’s networking(socket) and audio libraries.

 

So, Is it possible I can move the libas.c/h to an external folder and include this folder on my both phone and wearable projects? 

 

I have made a small test of doing this by “right-click the project -> properties -> C/C++ general -> paths and symbols -> link folder”, but it doesn’t work. Tizen studio seems to misrecognize the folder and refuse to show what files are inside the folder (also not compilable)

 

Written by