Code::Blocks Forums

User forums => Help => Topic started by: pwnedu46 on July 30, 2011, 08:48:15 pm

Title: SMFL not working in Code::Blocks
Post by: pwnedu46 on July 30, 2011, 08:48:15 pm
When I get to the dialog box that says "Please select SMFL's location:," I enter it, and click next. Then, and error message titled "Script Error" appears that says "The path you entered seems valid, but this wizard can't locate the following SMFL's include file: Audio.hpp in it." When I opened the folder and went to
SMFL-1.6 > include > SMFL > Audio, the file is there.

Any help would be appreciated. I'm trying to move away from the console into GUIs, but this isn't helping.

[self-moved from Using Code::Blocks to this forum. I thought I was in this forum when I posted it.]

[attachment deleted by admin]
Title: Re: SMFL not working in Code::Blocks
Post by: MortenMacFly on July 31, 2011, 09:39:26 am
Any help would be appreciated. I'm trying to move away from the console into GUIs, but this isn't helping.
SFML changes it's paths with every version it seems. You'll need to change the wizard accordingly. To do so, right-.click on the wizard and select "edit". Then change the following passages accordingly:
Code
        if (dir_nomacro_inc.IsEmpty())
            return false;
        if (!VerifyFile(dir_nomacro_inc, _T("SFML/Audio.hpp"), _T("SFML's include")))
            return false;
        if (!VerifyFile(dir_nomacro_inc, _T("SFML/Config.hpp"), _T("SFML's include")))
            return false;
        if (!VerifyFile(dir_nomacro_inc, _T("SFML/Graphics.hpp"), _T("SFML's include")))
            return false;
        if (!VerifyFile(dir_nomacro_inc, _T("SFML/Network.hpp"), _T("SFML's include")))
            return false;
        if (!VerifyFile(dir_nomacro_inc, _T("SFML/System.hpp"), _T("SFML's include")))
            return false;
        if (!VerifyFile(dir_nomacro_inc, _T("SFML/Window.hpp"), _T("SFML's include")))
            return false;
For example, change:
Code
        if (!VerifyFile(dir_nomacro_inc, _T("SFML/Audio.hpp"), _T("SFML's include")))
            return false;
...to:
Code
        if (!VerifyFile(dir_nomacro_inc, _T("SFML/Audio/Audio.hpp"), _T("SFML's include")))
            return false;
...and so on.

I think such change won't make it into trunk, as this would break compatibility with older version. You could (however) do it better with an OR clause to support all path layouts. Patches are welcome.