setting up the SDL

Discussion about everything. New games, 3d math, development tips...
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

setting up the SDL

Post by 3DModelerMan »

I have been wanting to use SDL, but setting it up with irrlicht just does'nt seem to work, I can set it up fine without irrlicht setup to, but I don't
know how to set it up. I use code::blocks with mingw, on windowsXP.
Thanks :D .
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

I was wondering: why is it worth anyone's time trying to help you, since (based on your track record) you'll just give up as soon as you hit a problem?

Prove me wrong by putting some effort into your question.

What technique or tutorial have you tried so far? Can you provide a URL for it?

What have you done differently from that tutorial?

What version of SDL are you using?

What exactly "just does'nt [sic] seem to work"? Presumably you can copy and paste an error message.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
CuteAlien
Admin
Posts: 9652
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

"doesn't seem to work" ... that's strangly the same problem I have with your question.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

this

Post by 3DModelerMan »

I've tried these
http://www.sdltutorials.com/sdl-tutorial-basics/

http://angelorohit.blogspot.com/2008/05 ... ndows.html

and I get, undefined reference errors, I changed nothing except for the fact that I linked to libSDL and libSDLmain, are these not the same or something?.
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
benny53
Posts: 131
Joined: Fri May 26, 2006 10:21 pm
Location: Ohio

Post by benny53 »

So you are having problems with Irrlichts built in SDL device? Or did you not know that existed? I have no clue anything about it, but I have seen it in the source of Irrlicht quite a bit.
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

no

Post by 3DModelerMan »

I did'nt even know it existed.
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
CuteAlien
Admin
Posts: 9652
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: this

Post by CuteAlien »

3DModelerMan wrote:and I get, undefined reference errors,
Didn't we just have a long long thread where I tried to tell you that you should not try to summarize error messages but instead post the exact error messages which you get? Undefined references mean you don't link something. But if you want to know what is missing you have to post the errors.

Once more: Errormessages are important. They are the way programs talk to programmers. Their sole reason for existence is to give information to solve problems. If you want help then please do stop cutting out the most useful information which you have on your hands.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
benny53
Posts: 131
Joined: Fri May 26, 2006 10:21 pm
Location: Ohio

Post by benny53 »

I did'nt even know it existed.
Well it does, so I would suggest looking into it. I'm not sure how you would use it, but it might take rebuilding Irrlicht and modifying the IrrCompileConfig.h file or something along those lines ( really don't feel like checking the headers name right now XD ).
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

dev hub

Post by 3DModelerMan »

I follow the steps of the dev hub tut, I link these files in this order
  • libIrrlicht.a
    opengl32
    glu32
    gdi32
    Newton.lib
    libmingw32.a
    libSDLmain.a
    libSDL.dll.a
and the compile error I get when I #include "SDL" (or "<SDL>") is exactly

Code: Select all

Linking executable: data\bin\Main_game.exe
..\SDL-1.2.13\lib\libSDLmain.a(SDL_win32_main.o): In function `console_main':
/Users/hercules/trunk/SDL-1.2/./src/main/win32/SDL_win32_main.c:246: undefined reference to `_SDL_main'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 3 seconds)
1 errors, 9 warnings
.
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
Seven
Posts: 1030
Joined: Mon Nov 14, 2005 2:03 pm

Post by Seven »

maybe your compiler is too fast. put it back on regular speed.
jam
Posts: 409
Joined: Fri Nov 04, 2005 3:52 am

Re: dev hub

Post by jam »

3DModelerMan wrote: and the compile error I get when I #include "SDL" (or "<SDL>") is exactly
Is that supposed to be a header file? Or do you have a file that is called SDL with no extension that you are trying to include?
system-independent, adj.:
Works equally poorly on all systems.
-- unknown
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

arghh

Post by 3DModelerMan »

That was a typo it's supposed to be "SDL.h".
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
Dark_Kilauea
Posts: 368
Joined: Tue Aug 21, 2007 1:43 am
Location: The Middle of Nowhere

Post by Dark_Kilauea »

Make sure the SDL lib was compiled with the same compiler you are using for your application, and even that it was compiled in the same mode (Debug vs Release). This can make a large difference, especially on windows.
rogerborg wrote:Every time someone learns to use a debugger, an angel gets their wings.
CuteAlien
Admin
Posts: 9652
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: dev hub

Post by CuteAlien »

3DModelerMan wrote: and the compile error I get when I #include "SDL" (or "<SDL>") is exactly

Code: Select all

Linking executable: data\bin\Main_game.exe
..\SDL-1.2.13\lib\libSDLmain.a(SDL_win32_main.o): In function `console_main':
/Users/hercules/trunk/SDL-1.2/./src/main/win32/SDL_win32_main.c:246: undefined reference to `_SDL_main'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 3 seconds)
1 errors, 9 warnings
.
Now we get ahead. First that console_main looks somewhat like you might have misunderstood what I meant in the other thread, but anyway the thing is described in the SDL FAQ: http://www.libsdl.org/faq.php?action=li ... category=4

If your main look like proposed in the solution there (which is also what I meant with console_main in the other thread) and it still does not work, then post again. But continue to check errors, you might get another undefined reference next if you are unlucky (for which you will also find a solution on that FAQ page).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
sudi
Posts: 1686
Joined: Fri Aug 26, 2005 8:38 pm

Re: dev hub

Post by sudi »

3DModelerMan wrote:I follow the steps of the dev hub tut, I link these files in this order
  • libIrrlicht.a
    opengl32
    glu32
    gdi32
    Newton.lib
    libmingw32.a
    libSDLmain.a
    libSDL.dll.a
The error is right there!!!
u have to link libSDL.dll.a before libSDLmain.a. just change the link order.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
Post Reply