Skip to content

Failed to link Clang built static library  #151

@moravas

Description

@moravas

Hi,

I have a CMake project, where I build aws-lambda-cpp as external project with Clang-14:

`
set(TESSER_THIRDPARTY_CMAKE_CACHE_ARGS
-DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-DCMAKE_CXX_STANDARD:STRING=${CMAKE_CXX_STANDARD}
-DCMAKE_INSTALL_PREFIX:PATH=${PROJECT_SOURCE_DIR}/bin
)

ExternalProject_Add(
aws_lambda_cpp
GIT_REPOSITORY https://github.com/awslabs/aws-lambda-cpp.git
GIT_TAG v0.2.7
SOURCE_DIR "${PROJECT_SOURCE_DIR}/aws-lambda-cpp"
BUILD_ALWAYS 1
UPDATE_COMMAND ""
CMAKE_CACHE_ARGS
${TESSER_THIRDPARTY_CMAKE_CACHE_ARGS}
)
`

when I link it against to my final executable, I get the following linker error:
/usr/bin/ld: /home/<...>bin/lib/libaws-lambda-runtime.a: error adding symbols: file format not recognized clang: error: linker command failed with exit code 1 (use -v to see invocation)

The CMake target:
target_link_libraries(${PROJECT_NAME} ${AWSSDK_LINK_LIBRARIES} Boost::json Boost::log Boost::log_setup mongo::mongocxx_static mongo::bsoncxx_static AWS::aws-lambda-runtime pthread odbc)

Can anybody help me, what did I wrong?

Please let me know, if additional information needed.

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions