Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) Undefined reference to 'SSLv2_method'

 

link error.

 

 

 

 

 

Full error message

 

(I failed to replicate this error on Ubuntu using Qt Creator 2.0.0 and Boost 1.40).

 

Undefined reference to 'SSLv2_method'

 

 

 

 

 

Cause

 

Operating system: Xubuntu 9.10 Karmic Koala

IDE: Qt Creator 1.2.1

Project type: Console Application

Compiler: G++ 4.4.1

Libraries used:

 

 

 

 

 

Qt project file

 

#-------------------------------------------------
#
# Project created by QtCreator 2010-07-23T09:55:24
#
#-------------------------------------------------
QT += core
QT -= gui
TARGET = CppLinkErrorUndefinedReferenceToSSLv2_method
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp
LIBS += -L/usr/local/lib -lboost_system

 

 

 

 

 

Source code

 

#include <boost/asio/ssl.hpp>

int main () {}

 

 

 

 

 

Solution

 

Add the following line to the Qt Creator project file:

 

LIBS += -L/usr/local/lib -lssl

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict