Please note:The SCons wiki is now restored from the attack in March 2013. All old passwords have been invalidated. Please reset your password if you have an account. If you note missing pages, please report them to webmaster@scons.org. Also, new account creation is currently disabled due to an ongoing spam flood (2013/08/27).
Differences between revisions 6 and 7
Revision 6 as of 2013-08-27 13:51:00
Size: 229
Editor: SonyaGold
Comment:
Revision 7 as of 2013-08-28 20:46:10
Size: 1142
Comment: Spam
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
My name is Scott and I am studying Occupational Therapy and Creative Writing at Seebenstein / Austria.<<BR>>
<<BR>>
Feel free to surf to my web site - [[http://dicasganharmassa.wordpress.com/|dieta pra ganhar massa muscular]]
This SConstruct file can be used as a simple template to build a SDL application in Windows. Uses MinWG and will need to be customized slightly to work with other compilers like Visual Studio's compiler.

This example includes a windows resource which links the executable to a .ico file and it uses the -mwindows flag so no annoying dialog window will appear when the application is started.

{{{#!python
# SCons SConstruct file to build a typical SDL application on Windows with a windows icon using mingw

env = Environment(ENV=os.environ)
Tool('mingw')(env)

build_filename = 'appname' # Will automatically add .exe extension
sources = [Glob('src/*.cpp'), env.RES('appname.rc')] #Add window resource to include .ico file
libraries = ['mingw32', 'SDLmain', 'SDL', 'SDL_mixer', 'SDL_image', 'SDL_ttf']
library_paths = ['/MinGW/lib']

env.MergeFlags('-mwindows') # Parse the -mwindows flag to remove the annoying console window
env.Program(target = build_filename, source = sources, LIBS = libraries, LIBPATH = library_paths)
}}}

'''appname.rc:'''
{{{
A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "appname.ico"
}}}

This SConstruct file can be used as a simple template to build a SDL application in Windows. Uses MinWG and will need to be customized slightly to work with other compilers like Visual Studio's compiler.

This example includes a windows resource which links the executable to a .ico file and it uses the -mwindows flag so no annoying dialog window will appear when the application is started.

   1 # SCons SConstruct file to build a typical SDL application on Windows with a windows icon using mingw
   2 
   3 env = Environment(ENV=os.environ)
   4 Tool('mingw')(env)
   5 
   6 build_filename = 'appname'  # Will automatically add .exe extension
   7 sources = [Glob('src/*.cpp'), env.RES('appname.rc')]  #Add window resource to include .ico file
   8 libraries = ['mingw32', 'SDLmain', 'SDL', 'SDL_mixer', 'SDL_image', 'SDL_ttf']
   9 library_paths = ['/MinGW/lib']
  10 
  11 env.MergeFlags('-mwindows')  # Parse the -mwindows flag to remove the annoying console window
  12 env.Program(target = build_filename, source = sources, LIBS = libraries, LIBPATH = library_paths)

appname.rc:

A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "appname.ico"

SDLWindowsApp (last edited 2013-08-28 20:46:10 by WilliamDeegan)