Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Integrating AWS S3 with Qt C++ (MSVC 2017 64 bit)

Integrating AWS S3 with Qt C++ (MSVC 2017 64 bit)

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
2 Posts 2 Posters 383 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    viniltc
    wrote on 28 Aug 2024, 10:22 last edited by viniltc
    #1

    Hi everyone,

    I'm currently working on integrating AWS S3 with a Qt C++ application on a Windows-based PC. I successfully built and installed the AWS SDK using CMake, and I created a small Qt desktop application to test the AWS S3 functionality. However, I'm running into linker errors, which I suspect might be related to the build process of the AWS SDK.

    Has anyone here successfully integrated AWS S3 with a Qt C++ application on Windows? If so, could you share the CMake configuration you used to build the AWS SDK?

    Here’s what I’ve done so far to build the AWS SDK:

    cmake .. -G "Visual Studio 15 2017 Win64" -DBUILD_ONLY="s3;core;transfer" -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="C:\aws-sdk-cpp-install"
    

    and in Qt .pro file I use something like this:

    QT       += core gui
    
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    
    CONFIG += c++11
    
    # You can make your code fail to compile if it uses deprecated APIs.
    # In order to do so, uncomment the following line.
    #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
    
    # Include path for AWS SDK headers
    INCLUDEPATH += C:/aws-sdk-cpp-install/include
    
    # Link against the AWS SDK libraries
    LIBS += -LC:/aws-sdk-cpp-install/lib \
        -laws-cpp-sdk-s3 \
        -laws-cpp-sdk-core \
        -laws-crt-cpp \
        -laws-checksums \
        -laws-c-event-stream \
        -laws-c-common \
        -laws-c-io \
        -laws-c-auth
    
    SOURCES += \
        main.cpp \
        mainwindow.cpp
    
    HEADERS += \
        mainwindow.h
    
    FORMS += \
        mainwindow.ui
    
    
    # Default rules for deployment.
    qnx: target.path = /tmp/$${TARGET}/bin
    else: unix:!android: target.path = /opt/$${TARGET}/bin
    !isEmpty(target.path): INSTALLS += target
    
    

    error building the app is as:
    6288b94d-dc80-4b99-8b63-20f467836e44-image.png

    I would appreciate any advice or tips on the best CMake configuration to use the library in Qt C++ (with compiler MSVC 2017 64 bit) on Windows environment or any additional steps needed to resolve these linker errors.

    Thanks in advance for your help!

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 28 Aug 2024, 18:58 last edited by
      #2

      Hi,

      Since you built the SDK statically, you have to ensure you pass the libraries in the correct order when linking to them.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      1/2

      28 Aug 2024, 10:22

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved