(C++) openssl/conf.h: No such file or directory
February 24, 2017 · View on GitHub
(C++) openssl/conf.h: No such file or directory
Full error message
/usr/include/boost/asio/ssl/detail/openssl_context_service.hpp:74: undefined reference to 'SSLv2_method'
Cause
IDE: Qt Creator 1.2.1
Project type: Qt4 Console Application
Selected required modules: QtCore
Boost version: 1.38.0.
The following code caused the error:
#include <openssl/conf.h>
Solution
The openssl folder is not set as an include folder. You can find it using any file finder (for example, Catfish under Xubuntu, or Windows Find under Microsoft Windows).
In Qt Creator, you can set it as an include folder by editing the project file (for example, MyProject.pro). To start editing it, double-click it.
Add the following line:
INCLUDEPATH += ~/../../usr/include
Note that in this example the location of the include folder was was '~/../../usr/lib'.