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

Author Topic: sfml & WxWidgets  (Read 1532 times)

0 Members and 1 Guest are viewing this topic.

volch

  • Newbie
  • *
  • Posts: 1
    • View Profile
sfml & WxWidgets
« on: November 23, 2010, 03:54:27 am »
So this tutorial is kind of interesting. http://www.sfml-dev.org/tutorials/1.6/graphics-wxwidgets.php

But how do you actually compile the code?
Using my somewhat limited knowledge of wxWidgets development and the SFML tutorial here.

I was able to get this compile line to not give any dependency errors:
Code: [Select]
g++ wxSFMLCanvas.cpp -lsfml-graphics `wx-config --libs` `wx-config --cxxflags` `pkg-config --cflags gtk+-2.0` `pkg-config --libs gtk+-2.0` -o out


But it fails with the somewhat cryptic:
Quote
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
collect2: ld returned 1 exit status


Which means. . . what exactly?
what am I going about wrong?
I'm new to SFML and somewhat new to wxWidgets, still only a journeyman with Linux.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
sfml & WxWidgets
« Reply #1 on: November 23, 2010, 08:00:22 am »
This class is not a complete application, you need to use it in a real program with at least a main() entry point.
Laurent Gomila - SFML developer