语言

Menu
Sites
Language
Using Static Lib inside Native UI application project

Hi,

I'm trying to build some individual libraries and then integrate them into the main UI project.

I referred the steps from "https://developer.tizen.org/ko/forums/native-application-development/static-library?langswitch=ko"

But Im still getting "Undefined reference" error or "Permission Denied" error, if I try to give the default lib available path of debug folder.

Are there are any privileges to be added to use a lib ?

Please help me with this.

I had spent so many hours in solving this but no clues yet.

Thanks.

 

 

 

 

 

响应

4 回复
daniel kim

Hi,

As far as I know, you don't need specific privilege to use static library.

It looks like a link error inside of your source and I would suggest you to post more detail here.

Regards

 

Vikram

Hi,

Did you try below configuration? Copied from https://developer.tizen.org/forums/native-application-development/static-libary-%EC%82%AC%EC%9A%A9%EC%9D%80-%EC%96%B4%EB%96%BB%EA%B2%8C-%ED%95%98%EB%82%98%EC%9A%94

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.

Sathya Priya R

Hi,

I referred and did all the steps as mentioned.

The problem I noted now is, Under the "Tizen Settings option", the "Platform Architecture" and the "Toolchain name" does not remain constant as the one I select.

For example, I had choosed,

Architecture : ARMv7-a and Toolchain  : GCC-4.6

After this selection, compilation succeeds.

But when I try to debug, the Settings information changes to Architecture : "X86" and error is thrown saying,

                                                                                                                                            "could not read symbols: File in wrong format"

Same issue with any configuration, "Debug/Release/All".

What is the mistake?

Thanks.

 

 

Carsten Haitzler

the emulator is actually an x86 machine. phones and tv's are arm. you can't debug an arm static lib in the emulator, or an x86 static lib  on a device, unless you have both architectures compiled arleady... you will need to arrange that and use the appropriate one.