This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

adding libpng to Codec Engine

Hi,

I've been able to add .c sources in my Codec Engine HLOS application by modifying the package.bld

i.e.

var srcs = ["app.c", "my_module1.c","my_moule2.c"],;

Now I'd need to add a library (libpng) in the same project. How do I have to do this?

Regards,
gaston

  • In order to give more information I'd like to say that libpng12.a is built for a V5T platform, provided with EZSDK 5.04.00.11 and located at

    /ti-ezsdk_dm816x-evm_5_04_00_11/linux-devkit/arm-none-linux-gnueabi/usr/lib

    In addition I'm able to build and run a libpng project successfully on my TI816x evm board but outside of the CE. How could I include this library into my CE project?

    Regards,
    gaston

  • Gaston,

    I'm not sure if there's a better way to do this, but what you could try is adding the library to your GCArmv5T target in the build script for your program.  For example, if you have Codec Engine 3.22.01.06 (based on you EZSDK version), there is a file <CE_INSTALL_DIR>/codec_engine.bld, which is the build script for the Codec Engine examples. In codec_engine.bld, there are the lines:

    var lnkOpts = {
        "gnu.targets.arm.GCArmv5T" : " -lpthread -lrt -ldl ",

    You could change this to:

    var lnkOpts = {
        "gnu.targets.arm.GCArmv5T" : " -lpthread -lrt -ldl /ti-ezsdk_dm816x-evm_5_04_00_11/linux-devkit/arm-none-linux-gnueabi/usr/lib/libpng12.a",

    I will look into this some more to see if there is a better way, but in the meantime, this should work for you.  I did try adding a library in 'lopts' passed to Pkg.addExecutable() in the package.bld for my test case, but could not get this to work as I had expected.

    Best regards,

        Janet

  • Janet,

    Thank you. It finally works by adding this to the codec_engine.bld:

     "gnu.targets.arm.GCArmv5T"        : " -lpthread -lrt -ldl -L${EZSDK}/linux-devkit/arm-none-linux-gnueabi/usr/lib -lpng -lz",

    Your suggestion was very helpful but you are right, there is probably a better way to do it.

    Please, let me know if you find an alternative.

    Regards,
    gaston