Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Undefined Reference to TGUI functions  (Read 1834 times)

0 Members and 1 Guest are viewing this topic.

thephysicist

  • Newbie
  • *
  • Posts: 1
    • View Profile
Undefined Reference to TGUI functions
« on: January 17, 2020, 04:09:21 pm »
Hello,

I'm using Linux Mint, installed TGUI via the manual on the tutorial page and get this from my cmake file

Quote
-- Found SFML 2.4.2 in /usr/include
-- Found TGUI 0.8.6 in /usr/lib/x86_64-linux-gnu/cmake/TGUI
-- Configuring done
-- Generating done

When I try to get the example program, I get the following errors:

Quote
undefined reference to `tgui::Gui::Gui(sf::RenderWindow&)'
undefined reference to `tgui::Gui::handleEvent(sf::Event)'
undefined reference to `tgui::Gui::draw()'

I tried compiling with C++17 and C++14.

texus

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • TGUI
    • Email
Re: Undefined Reference to TGUI functions
« Reply #1 on: January 17, 2020, 07:05:06 pm »
Are you linking with tgui?
In cmake that would be like "target_link_libraries(your-target PRIVATE tgui)".
« Last Edit: January 17, 2020, 07:06:43 pm by texus »
TGUI: C++ SFML GUI

 

anything