分类: LINUX
2006-05-26 13:17:21
First thing you need to do is download SDL headers and binaries.
You will find them on the SDL website, specifically on .
Scroll Down to the Development Libraries section and download the MinGW32 development library
Open gz archive and there should be a *.tar archive inside.
Open the *.tar and there should be a folder side of that.
Open the folder and it'll contain a bunch of subfolders.
Copy the contents of the lib subfolder to the MinGW lib folder.
The MinGW lib folder should be at C:\MinGW\lib.
After that, open the include subfolder in the archive and extract the folder named "SDL" to the MinGW include folder, which should be at C:\MinGW\include.
Note: Some versions of SDL won't have a folder named "SDL" in the archive's include subfolder, but just a bunch of header files. To get around this simply create a folder named "SDL" in your MinGW include folder and copy all the header files from the archive to that folder you made.
Now take the SDL.dll from the archive (it should be inside the bin subfolder), and extract it to C:\WINDOWS\SYSTEM32.
This is so whenever you make an SDL app, the program will be able to find SDL.dll even if SDL.dll is not in the same directory.
Now start up Eclipse and start a new project.
Make it a managed make C++ project.
Then hit next.
Name your project.
Then hit next.
Then hit finish.
Go to the project properties.
Go to the C/C++ Build menu, then the Libraries submenu. In the Libraries submenu click add.
Then paste in:
Then do the same with:
Add source new source file to the project, and paste the following code into the new source file:
Now save the source and compile.
If there's no errors, you're finished.