Author Topic: Troubles on creation of SDL project  (Read 11004 times)

dvallet

  • Guest
Troubles on creation of SDL project
« on: July 04, 2012, 06:50:11 am »

Hi,

I'm starting in code blocks and wanted to do a "8bit oric paint" on windows.
I think about using c and sdl dll.

So i've installed the full package of code::blocks and the sdl v1.2 i've found there (http://www.libsdl.org/download-1.2.php/release/release/release/SDL-devel-1.2.15-mingw32.tar.gz).

I've used the instructions i red there : http://loka.developpez.com/tutoriel/sdl/installation/codeblocks/
(yes, i'm french and my english isn't fluent  :D)

But i've this message at the creation of a project :
"the path you entered seems valid, but this wizard can't locate the following sdl's include file : sdl.h in it.
(of course, my sdl.h init is in codeblocks/mingw/include/sdl/sdl.h)

Thanks for your help.
Didier


Offline ptDev

  • Almost regular
  • **
  • Posts: 222
Re: Troubles on creation of SDL project
« Reply #1 on: July 04, 2012, 08:06:16 am »
Which path did you provide to the project wizard?

Did you define an environment variable (probably #SDL) pointing at the location of the SDL headers and libraries?

Offline Mallot1

  • Single posting newcomer
  • *
  • Posts: 4
Re: Troubles on creation of SDL project
« Reply #2 on: October 04, 2012, 03:29:20 am »
here do it from this site it  got sdl to work for me today.
http://lazyfoo.net/SDL_tutorials/lesson01/windows/codeblocks/index.php

 :o :o :o :P ::) 8) 8) 8) 8) 8) 8) 8) 8) 8) ;)

Offline Mallot1

  • Single posting newcomer
  • *
  • Posts: 4
Re: Troubles on creation of SDL project
« Reply #3 on: October 04, 2012, 03:33:48 am »
i also used thiis site
http://www.dreamincode.net/forums/topic/57275-setting-up-codeblocks-to-work-with-sdl/

so go through all the build options info then head over to here:
http://lazyfoo.net/SDL_tutorials/lesson01/windows/codeblocks/index.php

and finish the setup good luck!

Offline Freem

  • Almost regular
  • **
  • Posts: 219
Re: Troubles on creation of SDL project
« Reply #4 on: October 05, 2012, 03:48:27 pm »
Dvallet, this article is pretty old: 1st may 2006! 6 years ago, C::B was not really the same.

When I am creating a new sdl on windows, project, I do this:
_ creating a new project, but an empty one
_ creating a C::B global variable (so, not in code) with "include" and "lib" fields filled
_ creating an empty project
_ adding it $(#sdl.include) in header path
_ adding it $(#sdl.lib) in lib path
_ Adding it "SDL" and "SDLmain" in libraries
_ Creating a main.cpp (or .c, depending on language)
_ enjoying

It is a bit longer than using official projects, but, honestly, I had enough problems with them and boring errors like the one you are having.

Notes:
_ ref for compiler global varialbles: http://wiki.codeblocks.org/index.php?title=Global_compiler_variables
_ checking documents' dates of resources you will find on internet is often a good idea, especially when it comes to a software. And DVP.com is not an exception: it sure have nice content for us, but it is an old site which contain some outdated content (but many interesting things too)

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Troubles on creation of SDL project
« Reply #5 on: October 05, 2012, 04:03:40 pm »
If you have a working basic project, you can save it as user template: "File -> Save project as template..."
To use this template, go oto "File -> New -> From template..."

Offline Freem

  • Almost regular
  • **
  • Posts: 219
Re: Troubles on creation of SDL project
« Reply #6 on: October 05, 2012, 04:10:32 pm »
If you have a working basic project, you can save it as user template: "File -> Save project as template..."
To use this template, go oto "File -> New -> From template..."

I am no longer using windows (except at work but the IDE is VS :/ ), and I really love the linux way to include things (so easier to just add the command "sdl-config" with good args... I wonder how those scripts are generated... hand-crafted?) so it is no longer useful for me :P
Also, I rarely use a project with a single lib, so I add all libs in same time: that's not really long.