Indefined reference tgui::Window
« on: 06 September 2013, 18:15:30 »
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 :
Code: [Select]
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

  • *****
  • 1143
    • View Profile
    • Texus's Blog
Re: Indefined reference tgui::Window
« Reply #1 on: 06 September 2013, 18:19:27 »
You aren't linking to the tgui library.

Code: [Select]
g++ main.o -o app -L ../TGUI/lib  -L ../SFML/lib -lsfml-graphics -lsfml-window -lsfml-systemshould just be
Code: [Select]
g++ main.o -o app -L ../TGUI/lib  -L ../SFML/lib -ltgui -lsfml-graphics -lsfml-window -lsfml-system

Re: Indefined reference tgui::Window
« Reply #2 on: 06 September 2013, 18:39:42 »
Thanks a lot i'm stupid ^^