• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Acharis

Code::Blocks "SDL2.dll not found"

5 posts in this topic

I have a slight configuration problem with Code::Blocks. My old SDL1.2 is configured nicely, it uses dlls from the SDL bin folder. But for some reason I can't configure SDL 2.0 the same way and I need to manually copy dlls to the project folder (I don't want to drop these to the system folder, want to contain this within Code::Block and projects environment).

 

I can't find any difference between my SDL 1.2 and SDL 2.0 configuation, I must be missing something...

I attached a screenshot with all steps I took.

0

Share this post


Link to post
Share on other sites

Are you sure you didn't have another copy of SDL 1.2's dll in your system folder which is in the system path variable?

 

If you do want to change your working directory though, it should be project->properties->build target->[name]->execution working directory. Execution working directory looks like it's on your last screenshot there.

1

Share this post


Link to post
Share on other sites

I have a slight configuration problem with Code::Blocks. My old SDL1.2 is configured nicely, it uses dlls from the SDL bin folder. But for some reason I can't configure SDL 2.0 the same way and I need to manually copy dlls to the project folder (I don't want to drop these to the system folder, want to contain this within Code::Block and projects environment).

 

I can't find any difference between my SDL 1.2 and SDL 2.0 configuation, I must be missing something...

I attached a screenshot with all steps I took.

I've attached an SDL2 project wizard to this reply. Tested on Windows 8 Pro x64 with stock installs of Code::Blocks 13.12, MinGW32 and SDL2 2.0.1 - I suppose it works on Linux as well since sdl2-config is mentioned in the wizard, but I didn't test (look at the edit below).

How to install on Windows:
1) Make a backup copy of C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\config.script because it will be overwritten.
2) Unzip the attached file to C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates
3) Done. Now when creating a new project, the "SDL2 project" template is available.

Details:
1) The template only assumes that stock SDL2 is installed, and only links against SDL2main and SDL2.dll - in other words, if you are using SDL2_image, SDL2_mixer, SDL2_net, or SDL2_ttf, you'll have to manually add those to the Linker settings/Link libraries under Build options.
2) The template includes a post-build step that copies the SDL2 DLLs to the output folder - in other words, you can run the project directly after building. There's no need to copy the DLLs to the output folder nor to any other folder in your PATH. I suppose this solves the problem you reported.

 

EDIT: Just tested it on Code::Blocks 12.11 on Debian Wheezy 32-bit with libsdl2-dev from wheezy-backports, and it worked.

How to install on Debian Wheezy 32-bit (I suppose it's not all that different on other distros):
1) Make a backup copy of /usr/share/codeblocks/templates/wizard/config.script because it will be overwritten.
2) Unzip the attached file to /usr/share/codeblocks/templates
2.5) If you're really picky, convert the line endings of /usr/share/codeblocks/templates/wizard/config.script using e.g. dos2unix
3) Done. Now when creating a new project, the "SDL2 project" template is available.

Edited by georger.araujo
2

Share this post


Link to post
Share on other sites


Are you sure you didn't have another copy of SDL 1.2's dll in your system folder which is in the system path variable?

If you do want to change your working directory though, it should be project->properties->build target->[name]->execution working directory. Execution working directory looks like it's on your last screenshot there.
No, It's not that I have SDL.dll installed (the same story is with SDL_TTF and SDL_Mixer I don't need to copy these when running a SDL1.2 project but have to copy them for SDL2 project.

 

The "execution working directory" in my SDL1.2 project is ".", it's the same for SDL2 project.

 

 


2) The template includes a post-build step that copies the SDL2 DLLs to the output folder
Well... you mean it will physically copy all dlls to the project folder after compiling? Not "link them without copying"? I wanted to make it like my SDL1.2 which requires no copying at all.

 

 

Well, it's not a big problem, but still I'm curious, why SDL1.2 and SDL2 setup behave so different...

0

Share this post


Link to post
Share on other sites

Your SDL exe works without the .dll in either the system nor its directory?

It looks like you are using static linkage on SDL1 and shared on SDL2.

If you were not linking SDL 1 statically, I really don't understand how it could work without the dll in the folder, system or PATH.

 

You can use a loader application, one that handles the path for your dll, or one that actually calls your true executable from, say, a separated bin folder, that has your dll.

0

Share this post


Link to post
Share on other sites


Your SDL exe works without the .dll in either the system nor its directory?
Yes. But only if run via Code::Blocks (it seems to be getting these from the directory specified by the global variables). The thing is, I have set the global variables the same way (at least it seems that way to me) for SDL2 and I can't get the same effect....

 


a separated bin folder, that has your dll
With the old SDL 1.2 it gets these from the bin folder of my libraries. With SDL2 I can't make it do it.

 

Again, I'm talking ONLY about Code::Blocks environment. It would be not posible for the final release version.

 

 

Or maybe Code::Blocks have set up PATH for the old SDL1.2? And when I tried to manually add SDL2.0 I missed that step somehow? (althrough I don't know how, even through I used the SDL template I needed to add  TTF and mixer manually, so it should not work for that one...)

It's driving me crazy, the mystery why this setup of SDL 1.2 and 2.0 behaves so different :D

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0