Skip to content

add -fPIC flag for static build on LINUX #77

@Eliyahu-Machluf

Description

@Eliyahu-Machluf

Hi,

I'm using the SDK static libraries for working with s3 (aws-sdk-cpp-[core,s3,transfer]). I wanted to create a DSO which statically link with these static libraries (embedding them within the DSO). However when building it, i got a compiler error that the static libraries were built with no PIC support.

I edited the relevant CMakeList.txt files adding the line
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "-fPIC")

I think it worth adding this to the static libraries (at least as optional configuration).

Thanks.

Eliyahu

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions