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.
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!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.