Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Pkgconfig file injects -std=c++11 into downstream projects #3613

@WillAyd

Description

@WillAyd

Describe the bug

When compiling a project that uses the SDK as a dependency and resolves said dependency with pkgconfig, the AWS SDK ends up injecting -std=c++11 into the compilation flags of the main project. This appears hard-coded in the configuration:

list(APPEND AWS_COMPILER_FLAGS "-fno-exceptions" "-std=c++${CPP_STANDARD}")

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

The dependency should not inject any c++ standard requirements into the parent project

Current Behavior

Compilation fails for projects newer than C++11

Reproduction Steps

Create a module that uses a C++14 feature, like so:

auto doNothing() {
}

int main() {
  return 0;
}

Attempting to compile this with a dependency on aws-cpp-sdk-core will fail:

$ gcc `pkg-config --cflags aws-cpp-sdk-core` main.cc
main.cc:1:1: error: ‘doNothing’ function uses ‘auto’ type specifier without trailing return type
    1 | auto doNothing() {
      | ^~~~
main.cc:1:1: note: deduced return type only available with ‘-std=c++14’ or ‘-std=gnu++14’

Possible Solution

No response

Additional Information/Context

No response

AWS CPP SDK version used

1.11.68

Compiler and Version used

gcc (Ubuntu 15.2.0-4ubuntu4) 15.2.0

Operating System and version

Ubuntu 25.10

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.needs-triageThis issue or PR still needs to be triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions