News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Troubles on creation of SDL project

Started by dvallet, July 04, 2012, 06:50:11 AM

Previous topic - Next topic

dvallet


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


ptDev

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?

Mallot1


Mallot1


Freem

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)

Jenna

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..."

Freem

Quote from: jens 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..."

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.