Author Topic: SMFL not working in Code::Blocks  (Read 5240 times)

Offline pwnedu46

  • Single posting newcomer
  • *
  • Posts: 4
SMFL not working in Code::Blocks
« 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]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: SMFL not working in Code::Blocks
« Reply #1 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ