Installing on Cygwin/Win2000

Hi! I downloaded the following file:

SDL-devel-1.2.3-mingw32.tar.gz

I unzipped it with winzip into a tmp-directory. I simply can’t find out
how to install it. There’s no configure-file or any
installation-script(or if there is, i can’t find it). Please help me with
this. I also downloaded the cross-configure.sh and cross-make.sh, but
they need the configure-file also. And I can’t find it. So how to
install SDL for Cygwin on a windows-computer.

P.S. should this be installed in CygWin-emulator or can I use Win2k
commandline and winzip?

I unzipped it with winzip into a tmp-directory. I simply can’t find out
how to install it. There’s no configure-file or any
installation-script(or if there is, i can’t find it). Please help me with

Okay. You have cygwin installed somewhere, with the paths
correctly set up? If so, do this;

Extract the ‘i386-mingw32msvc’ directory from the ‘i386-mingw32msvc.tar.gz’ from the zip into your cygwin (c:\dev\gcc for me) directory, (so that it’s bin / include / etc…directories
overlap).

Now, copy the SDL.dll file from the ‘lib’ directory to the directory where you will keep your source.

Create a Makefile there, like so:

all:
gcc -c sdltest.cpp
gcc sdltest.o -o sdltest -lmingw32 -lSDLmain -mwindows -lSDL

Create sdltest.cpp

#include <sdl/SDL.h>
#include <stdio.h>

int main(int argc, char* argv[])
{
printf(“Initializing SDL.\n”);
if((SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO)==-1)) {
printf(“Could not initialize SDL: %s.\n”, SDL_GetError());
exit(-1);
}
printf(“SDL initialized.\n”);
printf(“Quiting SDL.\n”);
SDL_Quit();
printf(“Quiting…\n”);
exit(0);
}

… then try to make it.

Please note that any output will go to a textfile, not stdout/stderr.

Good luck.

Hi! I downloaded the following file:

SDL-devel-1.2.3-mingw32.tar.gz

I unzipped it with winzip into a tmp-directory. I simply can’t find out
how to install it. There’s no configure-file or any
installation-script(or if there is, i can’t find it). Please help me with
this. I also downloaded the cross-configure.sh and cross-make.sh, but
they need the configure-file also. And I can’t find it. So how to
install SDL for Cygwin on a windows-computer.

P.S. should this be installed in CygWin-emulator or can I use Win2k
commandline and winzip?

I had some difficulty getting cygwin to work with SDL. Here’s
what I did (using mingw32):

Download the latest SDL development libraries (as of this
writing, version 1.2.3)
http://www.libsdl.org/release/SDL-devel-1.2.3-mingw32.tar.gz
unzip into c:\SDL-1.2.3 or similar
Copy c:\SDL-1.2.3\i386-mingw32msvc\lib\SDL.dll into the
directory where you will develop your application.

Download MinGw
http://prdownloads.sourceforge.net/mingw/MinGW-1.1.tar.gz
Unzip into c:\mingw or similar
Add c:\mingw\bin to your path.
In WinXP or Win2k, go to the properties of My Computer, click on
the Advanced tab, click on Environment Variables. Click New
under User variables (or system if you want this to work for all
users). Enter “path” and “c:\mingw\bin” (without quotes).
In Win95, Win98 or WinME, run notepad, open c:\autoexec.bat and
at the bottom, add the line
set PATH=“C:\mingw\bin;%PATH%”

Install an editor
Even notepad will work, but I my personal favorite is SciTe.
Completely free and very useful. Available for Windows and
Linux.
http://www.scintilla.org/SciTEDownload.html

Create a .c or .cpp file for your project.
I suggest downloading a test or example file to begin with.

Create a Makefile file for your project.
The following three lines will be adequate (there are tabs
before the 2nd and 3rd lines)
all:
gcc -Ic:/SDL-1.2.3/i386-mingw32msvc/include/SDL -c
myproject.cpp
gcc -Lc:/SDL-1.2.3/i386-mingw32msvc/lib myproject.o -o
myproject -lmingw32 -lSDLmain -mwindows -lSDL

If you are going to use OpenGL, add “-lglu32 -lopengl32” to the
end of the last line in the Makefile. You may need to add
"-Ic:/path/to/opengl/headers" after gcc in the 2nd line.

To compile your program, simply open a command prompt, cd to the
directory of your project and type “make”. If you are using
SciTe, you can press F7 to run a “make” and F5 to execute the
application.

Note that any text that is headed towards stdout (the console)
is redirected to stdout.txt. Similarly for stderr.

— Juhana Lehtiniemi wrote:> Hi! I downloaded the following file:

SDL-devel-1.2.3-mingw32.tar.gz

I unzipped it with winzip into a tmp-directory. I simply
can’t find out
how to install it. There’s no configure-file or any
installation-script(or if there is, i can’t find it). Please
help me with
this. I also downloaded the cross-configure.sh and
cross-make.sh, but
they need the configure-file also. And I can’t find it. So
how to
install SDL for Cygwin on a windows-computer.

P.S. should this be installed in CygWin-emulator or can I use
Win2k
commandline and winzip?


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

=====
Dave Brondsema
dave at brondsema.net
http://www.brondsema.net


Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions!
http://auctions.yahoo.com