Hello,
i try to launch a minimalist code to launch a SDL window. you can find it with this link: premier code.
http://alexandre-laurent.developpez.com/tutoriels/sdl-2/installation-et-configuration/[http://alexandre-laurent.developpez.com/tutoriels/sdl-2/installation-et-configuration/]
I have configured code::block and when i build it is Ok but when i launch the code, i have an error message saying that directX not available.
Any suggestion?
thanks
I’m assuming you’re on Windows. Which version is it exactly?
SDL provides a feature that lets you select the video driver with an environment variable. The variable is called SDL_VIDEODRIVER
. If you set this environment variable to “directx”, SDL 2 will complain that it doesn’t have such a driver with “directx not available”.
“directx” is a video driver in SDL 1.2. Perhaps you have this environment variable set for your user or system?
Try opening cmd.exe
, type SET
and press enter. This will list all environment variables. Check if there are any SDL_*
variables set. If you find SDL_VIDEODRIVER
, you can delete it in the appropriate control panel menu. There are a few resources like this on the internet on how to do that.
It’s possible that code::blocks has the ability to set environment variables for the programs it is launching. Check in its configuration if there’s anything.
Hello,
that was that!
Thanks a lot!