Problem integrating QT 5.10 C++ Desktop GUI project using AWS C++ SDK.
I'm brand new to QT. I've consumed the AWS SDK in other languages but not C++ as it's not my primary language of use today. I'm entering both via QT due to a desire for developing cross platform desktop applications in support of Mac and Windows platform primarily.
My primary development environment is MacOS. (10.13 High Sierra)
We leverage AWS SQS quite extensively in our projects and are starting to also us Lambda and Kinesis. I've had some difficulty even getting a build of the SDK to work itself. Keeps giving me a "Undefined symbols for architecture x86_64". (Not QT specific in this case as I'm just building from the command line following the AWS docs.(
I discovered home brew had listed so instead of building from source at the moment, I used brew install aws-sdk-cpp to get an SDK build directory. I added this as an external library in QT Creator.
When I try to build I get symbol(s) not found for architecture x86_64
My project file is as follows:
#------------------------------------------------- # # Project created by QtCreator 2018-05-13T00:41:50 # #------------------------------------------------- QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = amazon TEMPLATE = app # The following define makes your compiler emit warnings if you use # any feature of Qt which has been marked as deprecated (the exact warnings # depend on your compiler). Please consult the documentation of the # deprecated API in order to know how to port your code away from it. DEFINES += QT_DEPRECATED_WARNINGS # You can also make your code fail to compile if you use deprecated APIs. # In order to do so, uncomment the following line. # You can also select to disable deprecated APIs only up to a certain version of Qt. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ main.cpp \ mainwindow.cpp HEADERS += \ mainwindow.h FORMS += \ mainwindow.ui macx: LIBS += -L$$PWD/../../Desktop/aws-sdk-cpp/1.4.40/lib/ -laws-cpp-sdk-sqs INCLUDEPATH += $$PWD/../../Desktop/aws-sdk-cpp/1.4.40/include DEPENDPATH += $$PWD/../../Desktop/aws-sdk-cpp/1.4.40/include
I'm just using a simple function to attempt to send an SQS Message using the AWS example.
Does anyone have perhaps a simplistic starter project to consume any of the AWS SDK services such as SQS, SNS or S3 that they could point me to?
Excited to get going with this!
Well, I seem to have solved it. The error I was getting wasn't particularly helpful. In reality, I needed to also include the aws-sdk-core library in addition to the aws-sdk-sqs. It is now happily building and sending messages to SQS. I did still use the brew version of the aws-sdk-cpp. I'll have to work on getting the cmake to build the sdk-build directory the way QT wants. Yet another new thing to wrap my head around. But this gives me something to wire up with other projects via messaging so I'm excited to keep going now.