Reputation: 1061
Trying to use OpenSSL in my Qt project, here is my environment:
I'm trying to include <openssl/evp.h>
in my code, however, when I add #include <openssl/evp.h>
in my main.cpp and build, Qt Creator shows the following error: D:\QtProjects\dialogs\findfiles\main.cpp:50: error: C1083: 'openssl/evp.h':No such file or directory
I have already followed the instructions in this question: How to Include OpenSSL in a Qt project
My .pro file looks like:
QT += widgets
HEADERS = window.h
SOURCES = main.cpp \
window.cpp
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/dialogs/findfiles
INSTALLS += target
# for openssl - I added these 2 lines
LIBS += -LC:/OpenSSL-Win32/lib -llibcrypto
INCLUDEPATH += C:/OpenSSL-Win32/include
Please help me fix this.
Upvotes: 1
Views: 2272
Reputation: 302
Posting this as an answer because iam pretty sure i figured it out.
You have to run Qmake before building, otherwise changes in your pro File will not be affected. Since Qmake is compiling your pro File into a makefile
Build->Run QMake
Worked for my OpenSSL library.
Good Luck!
Upvotes: 2