Advertisement Jump to content
Sign in to follow this  

smpeg odd behavior.

This topic is 4890 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi everyone. I'm using smpeg with SDL to play videos in my programs and I noticed that it links up to -LSDL.dll, and if I don't have that DLL in the directory of the example program then I can see the video when I execute it in Dev CPP. If I put SDL.dll into the directory of the program so that I can run it, I cannot see the video, just hear the audio. Does anyone know of a solution to this problem? I downloaded smpeg from a devpack with Dev-CPP. Oh, I'm using Windows.

Share this post

Link to post
Share on other sites
What's going on is that if I run the program in Dev-CPP without SDL.dll in the directory of my executable, it works fine because the example linked up to SDL.dll by -lSDL.dll.

WHen the dll isn't in the same directory as my executable, I can run the program in Dev-CPP, but if I put SDL.dll in the directory, I don't see any video.

I used to have SDL.dll in system32, but the reason that I don't, is that I want to make sure I know what dll's I need to have if I e-mail my programs to my friends so that they can run them.

Share this post

Link to post
Share on other sites
Here's the code.

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

#include <SMPEG/smpeg.h>

SDL_Surface *screen = NULL;

void shutdown(void){

int main(int argc, char *argv[]){


SDL_WM_SetCaption("Dev-C++ SMPEG-Lib Test", NULL);


SMPEG_Info mpg_info;
SMPEGstatus mpg_status;
SMPEG* mpg = SMPEG_new("test.mpg",&mpg_info,1);


mpg_status = SMPEG_status(mpg);

while(mpg_status == SMPEG_PLAYING){
mpg_status = SMPEG_status(mpg);

mpg = NULL;


return 0;

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!