Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Installation with Code::Blocks  (Read 1785 times)

0 Members and 1 Guest are viewing this topic.

Topdog2904

  • Newbie
  • *
  • Posts: 3
    • View Profile
Installation with Code::Blocks
« on: September 06, 2012, 04:07:00 pm »
Hi,

I am a bit of a newbie to coding and have been trying to 'install' sfml in conjunction with Code::Blocks.

I followed the guide word for word and when I try to compile the example code (below) it doesn't work:

#include <SFML/System.hpp>
#include <iostream>

int main()
{
    sf::Clock Clock;
    while (Clock.GetElapsedTime() < 5.f)
    {
        std::cout << Clock.GetElapsedTime() << std::endl;
        sf::Sleep(0.5f);
    }

    return 0;
}

Error is: "SFML - Debug" uses an invalid compiler. Probably the toolchain path within the compiler options is not setup correctly?! Skipping...
Nothing to be done.

Any help would be greatly appreciated

Andy

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: Installation with Code::Blocks
« Reply #1 on: September 06, 2012, 04:13:19 pm »
I strongly advise you to use SFML 2, because SFML 1.6 has many bugs and lacks quite a lot of features...

The tutorial for Code::Blocks assumes that you've installed and setup Code::Blocks correctly. The error message means that the IDE couldn't find the compiler, thus it's not setup right.
What version of C::B did you use? Note that the official  release are quite old and it's better to use a nightly build from the C::B forum.

Now that you know, that the problem is more Code::Blocks related than SFML, you maybe also find more information through google. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Topdog2904

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Installation with Code::Blocks
« Reply #2 on: September 06, 2012, 04:28:26 pm »
Thanks for the quick reply and information, I have version 10.05 of Code::Blocks.

I see where the problem could possibly lie. Using the guide, I downloaded MinGW with GCC 4.4. I simply deleted the old MinGW and replaced it with the new, is this correct?

I now realise this is more of a Code::Blocks problem and I should be on another forum, but seeing as we are here and Google seems to make everything worse at the moment... I may as well ask.

Andy

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: Installation with Code::Blocks
« Reply #3 on: September 06, 2012, 04:31:02 pm »
I see where the problem could possibly lie. Using the guide, I downloaded MinGW with GCC 4.4. I simply deleted the old MinGW and replaced it with the new, is this correct?
Which 'guide' are you refering to?
I guess that's the origin of the problem, you simply have to change the toolchain settings in Code::Blocks and point it to the right location/binary of MinGW gcc, shouldn't be that hard to figure out. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Topdog2904

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Installation with Code::Blocks
« Reply #4 on: September 06, 2012, 04:34:15 pm »
The SFML installation guide.

Okay, I will have a look now. Thanks for all your help, really appreciate it.

I can only apologise for my incompetence ;)

Andy

 

anything