NO

Poll

Can any one help me out in using the SDL graphic option in Pelles C?

SDL Graphic
0 (0%)
Error running example
0 (0%)

Total Members Voted: 0

Author Topic: Difficulty while using Pelles C Graphics  (Read 2807 times)

naeem

  • Guest
Difficulty while using Pelles C Graphics
« on: December 22, 2008, 11:58:30 AM »
Hi
I am new in using the graphics option in Pelles C compiler. After surfing the net I found out that I need to use SDL as an easy option in order to use graphics option. I found the details on the following website:
http://www.friedspace.com/cprogramming/sdlbasic.php
and after following all the guide through steps I downloaded an example program from the above link but while compiling it I am constantly getting the following message:
and while executing I got the following error:
Use <stdlib.h> instead of non-standard <malloc.h>
Building SDLTest.obj.
Use <stdlib.h> instead of non-standard <malloc.h>
Building naeem1.exe.
POLINK: error: Symbol '_SDL_main' is multiply defined: 'main.obj' and 'SDLTest.obj'.

 and can not run the program. Can you help me out please
Thanks
« Last Edit: December 22, 2008, 01:15:31 PM by naeem »

JohnF

  • Guest
Re: Difficulty while using Pelles C Graphics
« Reply #1 on: December 23, 2008, 11:03:24 AM »
Did you follow these instructions.

http://www.friedspace.com/cprogramming/sdlsetup2.php

Specifically you must add sdl.lib and sdlmain.lib to the linker options of your project.

John