SFML community forums

Help => General => Topic started by: volch on November 23, 2010, 03:54:27 am

Title: sfml & WxWidgets
Post by: volch 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. (http://www.sfml-dev.org/tutorials/1.6/start-linux.php)

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.
Title: sfml & WxWidgets
Post by: Laurent 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.