Skip to content

Latest commit

 

History

History
120 lines (67 loc) · 2.17 KB

File metadata and controls

120 lines (67 loc) · 2.17 KB

 

 

 

 

 

 

Link error.

 

 

 

 

 

Full error message

 


/MyFolder/main.cpp:7: error: undefined reference to 'TTF_Init'

 

 

 

 

 

 

Cause

 

IDE: Qt Creator 2.0.0

Project type: Qt4 Console Application

Selected required modules: QtCore

Compiler: G++ 4.4.1

 

The following source code was used:

 


[source cannot be disclosed]

 

The following project file was used:

 


#------------------------------------------------- # # Project created by QtCreator 2010-09-17T19:38:58 # #------------------------------------------------- QT += core gui TARGET = MyTarget TEMPLATE = app LIBS += -L/usr/local/lib -lSDL \ SOURCES += \ main.cpp

 

 

 

 

 

Solution

 

You need to link against the SDL true-type fonts library. Add the following line to your project file:

 


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