Open World Soccer Forum Index Open World Soccer
Community Forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Compile in Windows (part 2: using SDL and SDL_image)

 
Post new topic   Reply to topic    Open World Soccer Forum Index -> Programming
View previous topic :: View next topic  
Author Message
Massimo32
Site Admin


Joined: 11 Nov 2007
Posts: 177
Location: Bolzano, Italy

PostPosted: Thu Sep 10, 2009 8:48 pm    Post subject: Compile in Windows (part 2: using SDL and SDL_image) Reply with quote

After having installed MinGW and MSYS in part1, now we'll add the SDL and SDL_image libraries.

At the end of the the tutorial, you will be able to compile the revision 1 (!) of OWS.

From:

http://openworldsoccer.svn.sourceforge.net/viewvc/openworldsoccer/trunk/?pathrev=1

Download the GNU tarball into C:\msys\1.0\home\yourusername
Extract the tarball into a "ows" folder.

From:

http://www.libsdl.org/download-1.2.php

Dowload SDL-devel-1.2.13-mingw32.tar.gz

Estract the archive.
From "include", copy the whole SDL folder into c:\MinGW\include
From "lib", copy all files into c:\MinGW\lib
From "bin", copy SDL.dll into the "ows" folder

From:

http://www.libsdl.org/projects/SDL_image/

Download SDL_image-devel-1.2.7-VC9.zip

Extract the archive.
From "include", copy SDL_image.h into c:\MinG\include\SDL
From "lib", copy SDL_image.lib into c:\MinGW\lib
From "lib", copy:
- SLD_image.dll
- libpng12-0.dll
- zlib1.dll
into the "ows" folder

In the "ows" folder, replace the Makefile with this modified version:

Code:

objects = main.o graphics.o timer.o input.o common.o

ows : $(objects)
   g++ -o ows $(objects) -lmingw32 -lSDLmain -lSDL -lSDL_image -lopengl32 -lglu32

main.o : timer.h common.h input.h
graphics.o : graphics.h
timer.o : timer.h
input.o : input.h
common.o : common.h graphics.h

.PHONY : clean
clean :
   -rm ows.exe $(objects)



You should be able now to compile and run ows.exe:

Quote:

$ make
$ ./ows.exe
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Open World Soccer Forum Index -> Programming All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Get Open World Soccer at SourceForge.net. Fast, secure and Free Open Source software downloads