Static Library on Apalis iMX6

Hello,

I build qt with statically, but besides this I need to build static libraries. Can I tell to compile libraries statically when build an image for Apalis-imx6 or when build the toolchain?

Thanks.

HI @aktay

Which static libraries do you want to build?

If you want to add the static library to the image, just add this to the local.conf:

EXTRA_IMAGE_FEATURES += “ static library”,  

Please mind there is a space between the first quotation mark and the name of the library

If you want to add the static library to the SDK, then just add this to the local.conf:

SDKIMAGE_FEATURES_append = "  static library"

Please mind there is a space between the first quotation mark and the name of the library

Best regards, Jaski

Dear jaski,

Thanks for your quick reply. There is no special library I want, it depends on the requirements of the qt application. I will compile all libraries statically and show this path in qt application.

I’m gonna try this now.

Thanks.

You are welcome. We will be glad to have feedback on your results.

@jaski.tx There are still libraries with the .so extension. I don’t see libraries with the .a extension. Do you have another suggestion?
I’ve added the following line into local.conf.

EXTRA_IMAGE_FEATURES += " static library"
SDKIMAGE_FEATURES_append = " static library"

The word “static library” is just a replacement for the libraries you want to compile as static library. What is your use for this static libraries?

As I mentioned above, I compile qt statically but this is not enough.Besides on this some external libraries that the application needs must be compiled statically and specified in the application .pro file.
For example, the libraries (dynamically) used by the application are as follows.I must compile libraries statically, and in the application, I must define the paths of these static libraries…Of course, these libraries may vary depending on the application.

alt text

Dear @jaski.tx

OpenVG.so library comes with dynamic building, but there is no such library in static building. What should I add to local.conf to get OpenVG.a?

hi, thanks for the information. If you want all the staticdev-pkgs in the SDK, you can add this to the local.conf.

SDKIMAGE_FEATURES += "staticdev-pkgs

I think, there is no need of compiling the static library to the image.

This question is discussed in the following post.