Hi,
I have a problem compiling the Clock tutorial under MinGW, while under Linux it compiles nicely. I'm using a Makefile so developers can use different IDEs under Linux or Windows. But even without an IDE, using make from the command line, I get errors. I'm using the following simple makefile:
CC=g++
CFLAGS=-Wall
SFMLFILES=-I "../SFML-1.5/include" -L "../SFML-1.5/lib/mingw"
all: game
game: main.cpp
$(CC) $(CFLAGS) $(SFMLFILES) -o game.exe -lsfml-system main.cpp
The include and library files are the appropriate relative positions (but I have tried putting them explicitly in the MinGW's dirs and changing the Makefile, no improvement). I get a bunch of errors:
undefined reference to `sf::Clock::Clock()'
undefined reference to `sf::Clock::GetElapsedTime() const'
undefined reference to `sf::Clock::GetElapsedTime() const'
Both the include files and the library files are found, because if I break their names in the Makefile, I get not found errors. If I comment out all references to SFML in the code but keep the include clause, the program compiles nicely.
Any clues?