问题
How to download basic native C++ sample project for Tizen wearables in Tizen IDE.Currently I’m able to download sample project of C language only.Thanks in advance.
回答1:
Currently C is the native language of Tizen because most of the API are written as C function. There is a C++ library called DALi. You will find several sample app in Tizen Studio under Mobile UI segment.
But if you want, you can still use C++ in your code. For that, you have to change some settings in Tizen studio as follows
Step-1: You have to create cpp extension file to use cpp code by right clicking on src folder of your project. Go to
src --> New --> File--> file name must have .cpp extension
After that you have to change compiler settings for C++
Step-2: Right click on your project then go to
Properties --> C/C++ Build --> Settings --> Tool Settings --> C++ Compiler --> Dialect
Now select C++11 from "Language Standard" menu. After that Click OK to save it.
Step-3: Again Right click on project then go to
Properties --> C/C++ Build --> Tizen Settings --> Platform
Then goto "Toolchain Information" section and select any one from GCC-4.9 (default) or LLVM GCC-4.9 (default) from "Name" menu. Finally click OK to save it.
回答2:
There's a nice guide how to use C++ in Tizen at http://Tizen.jdm.host Author is using some utility classes that make everything much easier. You should check it out.
来源:https://stackoverflow.com/questions/40734830/starting-native-app-development-in-c-for-wearable-device-in-tizen-ide