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.

CCS/TDA2PXEVM: Creation of static library for OpenGL code

Part Number: TDA2PXEVM

Tool/software: Code Composer Studio

I am working on OpenGL rendering similar to functionality in SgxFrmCpy link, I want to create static library for the same using CCS, and I am facing following error

"/workspace_v7/test_lib/Includes/My_header.h", line 65: fatal error #1965: cannot open source file "links_fw/src/hlos/system/system_gl_egl_utils.h"
1 catastrophic error detected in the compilation of "../Source/My_source.c".

  • Hi Gayathri,

    I recommend you to use Make file based building source file instead of CCS.

    It looks like the you have given relative path of header which is not available. Please try with  absolute path once.

    also refer VisionSDK_UserGuide_BuildSystem.pdf from visionSDK 

    Thanks

    RamPrasad

  • Hi Ramprasad,

    I have added absolute path of  system_gl_egl_utils.h but still I am not able to create static library. As linux runs on A15 I am using GNUv6.3.1(Linaro) compiler and variant as TDA2Px [Cortex A] in CCS to create static library. Now I am getting following error:

    ../vision_sdk/links_fw/src/hlos/osa/include/osa.h:72:22: fatal error: execinfo.h: No such file or directory#include <execinfo.h>

    PS: I am not aware of of how to create static library with make build system as I am new to vision sdk framework

    Thanks in advance!

    Gayatri

  • Hi Ramprasad,

    I am able to create library successfully. I have kept my library inside sgxFrmCpy folder I want to use function in my library to one of the case in sgxFrmCpy to render my own geometry. Where should I add the LIB PATH of my library? 

    folder structure is as below:

    sgxFrmCpy/library/my_lib.a

    Thanks!

    Gayatri

  • Hi Gayatri,

    Good to know your issue is resolved.

    Please refer section 8 Adding new library to application of the VisionSDK_UserGuide_BuildSystem.pdf on adding LIB_PATH.

    Thanks

    RamPrasad

  • Hi Ramprasad,

    Thanks for your prompt response. As per your suggestion I have added my library path to  ../vision_sdk/build/rtos/makerules/rules_a15.mk file as below

    LIB_PATHS += $(vision_sdk_PATH)/links_fw/src/hlos/links_a15/sgxFrmcpy/library/my_lib.a

    build it but still it gives undefined references to the functions called inside library while linking, I am not able to figure it out.

    Thank you!

    Gayatri

  • hi Ramprasad,

    If I am creating static library for a15, please check if my configurations in CCS mentioned below are correct :

    1) Variant - TDA2PX[Cortex A]

    2) Compiler - GNU v6.3.1 (Linaro)

    Please let me if these configurations are correct.

    Regards,

    Gayatri

  • Hi Gayathri,

    Please use the default compiler gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf

    which is recommended with this version of visionSDK and makefile based compiling.

    Thanks

    RamPrasad

  • Hi Ramprasad,

    Thank you for your response. As per your suggestion I have created the library using the default compiler gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf and added lib path to ../vision_sdk/build/rtos/makerules/rules_a15.mk file as below

    LIB_PATHS += $(vision_sdk_PATH)/links_fw/src/hlos/links_a15/sgxFrmcpy/library/my_lib.a

    But it didn't worked out.

    Also I tried another way, as I am using library in hlos side so I added my library path to ../vision_sdk/build/hlos/makerules/linux/includes_a15.mk as below

    PLAT_LINK = -lmy_lib

    and placed my library to (LINUX_TARGETFS)/usr/lib and header to (LINUX_TARGETFS)/usr/include. With this modifications still it is giving undefined reference error while linking.

    Thank you!

    Gayatri

  • Hi Ramprasad,

    Changing compiler version works for me. But I added library path to  ../vision_sdk/build/hlos/makerules/linuxcommon_footer_a15.mk and it worked well.

    Thanks and Regards,

    Gayatri