语言

Menu
Sites
Language
static libary 사용은 어떻게 하나요?

안녕하세요.

제가 만든 코드를 라이브러리를 만든후 다른 앱에서 호출하여 사용할려고 합니다.

그런데 shared libary를 만들려고 하니 edj 파일에서 오류가 나와 컴파일을 하지 못하는데

static libary를 오류없이 컴파일이 됩니다.

근런데 static libary를 호출하여 사용하는 방법을 모르겠습니다.

响应

4 回复
daniel kim

안녕하세요. 프로젝트에 .a 파일 추가하는 방법은 아래와 같으니 참조하세요..

 

 Linking a Static Library to Your Application

In order to use the methods from a library in your Tizen application, you must link the library to your application. You have to include the corresponding header file in the application’s .cpp file. In addition, you must define the library and the search path to its location in the application project properties.

To set the library and search path in the application project properties:
1.In the Tizen IDE Project Explorer, right-click the on the application which intends to use the library and select Properties.
2.In the Properties window, select C/C++ Build > Settings.
3.From the Configuration drop-down menu, select the appropriate build configuration.
4.In the Tool Settings tab, select Tizen C++ Linker > Miscellaneous.
5.Add the static libraries to be used under “Other objects”. Include the path details with the library name. By default, app wizard creates a folder named “lib” under project root folder. This can be used to hold any external libraries.
6.Click Apply.
7.Repeat steps 3-6 for other build configurations.

To save the settings, click OK.

 

출처)   https://developer.tizen.org/documentation/articles/working-static-libraries-tizen

jeonghun cho

라이브러리 안에 있는 함수나 structure 는 호출부에서 어떻게 사용하나요?

Bogon Kim

라이브러리가 들어있는 헤더파일의 위치를 Include path에  추가하시면됩니다.

Shuhrat Dehkanov

Do we have moderators here?

It'd be better if we post questions in Korean to Korean forums (and move this and other questions in Korean to there, too).