Indefined reference tgui::Window

Started by moktar, 06 September 2013, 18:15:30

moktar

Hello all,

I'm trying to implement tgui in my sfml project but i've an error when i try to compil. I'm using a makefile.
My question is : How to implement TGUI in a makefile ? I only have a main.cpp.

My makefile :
app: main.o
g++ main.o -o app -L ../TGUI/lib  -L ../SFML/lib -lsfml-graphics -lsfml-window -lsfml-system

main.o: main.cpp
g++ -c main.cpp -I ../SFML/include -I ../TGUI/include


Thanks !!

texus

You aren't linking to the tgui library.

g++ main.o -o app -L ../TGUI/lib  -L ../SFML/lib -lsfml-graphics -lsfml-window -lsfml-system
should just be
g++ main.o -o app -L ../TGUI/lib  -L ../SFML/lib -ltgui -lsfml-graphics -lsfml-window -lsfml-system

moktar