still have SDL problems

Started by
11 comments, last by jakpandora 19 years, 7 months ago
for those of you who read my other thread, I am still having problems getting SDl to work. I downloaded the latest stable release, and ran an example program. I get the following error: "the procedure entry point SDL_SetModuleHandle could not be located in the dynamic link library SDl.dll" any help? I have the dll in the right directory and everything. [Edited by - jakpandora on September 21, 2004 1:57:18 PM]
______________________________My website: Quest Networks
Advertisement
Show us your source code. It could help.
Sounds like an outdated sdl.dll.
Here is the source:

#include <stdio.h>#include <stdlib.h>#include <SDL/SDL.h>// The functions are not shown to save spacevoid DrawPixel(SDL_Surface *screen, int x, int y,                                    Uint8 R, Uint8 G, Uint8 B);void Slock(SDL_Surface *screen);void Sulock(SDL_Surface *screen);int main(int argc, char *argv[]){  if ( SDL_Init(SDL_INIT_AUDIO|SDL_INIT_VIDEO) < 0 )  {    printf("Unable to init SDL: %s\n", SDL_GetError());    exit(1);  }  atexit(SDL_Quit);  SDL_Surface *screen;  screen=SDL_SetVideoMode(640,480,32,SDL_HWSURFACE|SDL_DOUBLEBUF);  if ( screen == NULL )  {    printf("Unable to set 640x480 video: %s\n", SDL_GetError());    exit(1);  }  // DRAWING GOES HERE  return 0;}


This is the exact same source from tutorial I got at the cone2d site. I dont think its an outdated dll, because it came with the latest stable release. the code compiles correctly and everything.
______________________________My website: Quest Networks
what IDE are you using? i dont see where you include the library....
FTA, my 2D futuristic action MMORPG
The SDL_SetModuleHandle call is used for calling inside of a WinMain() function.

Since i dont see a WinMain function, chances are you either havent linked your sdl.lib library or the SDL.h file is in the wrong place, or depricated.

Upgrade to SDL 1.2.7 or link your lib files correctly...what compiler?
gib.son
I use dev C++ 4.0 and did everything exactly the way the tutorial told me to. I dont think it said to make a winmain() function, because it was supposed to be made in a console. also, I notice that when downloading the latest stable release, it is a tar.gz file or something like that. I thought that file formtat only worked with windows? if it doesnt, wouldnt I have to somehow manually extract the files instead of using winzip? I would have no idea where to put them if I did that.
______________________________My website: Quest Networks
Can nobody help? I extracted all of the files and put them in the right folders, and I still get the problems. any help?
If you are downloading a tar.gz file, than you are probably downloading a linux or unix version of whatever file it is. If it's got .h files, those will work, but any lib or runtime files will be incompatable.
edit: are you downloading this from the SDL website? They have a seperate build of the runtime environment for windows.
I got it to work! I download the development files of version 1.2.7 with the tar.gz file extension for mygwin32. I replaced all the old files with the files from the old version, and everything worked. I still have one question, though. I downloaded all the tutorials fomr cone3d. while I understood pretty much everything from the first tutorial, I hardly understood half of the stuff from the second one. Do I have to know what everything is doing at every single time, or would I be ok just copying and pasting some of the stuff I dont understand for now?
______________________________My website: Quest Networks

This topic is closed to new replies.

Advertisement