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

Author Topic: Configuring c::b on Mac OS X. Missing SFML libs.  (Read 1178 times)

0 Members and 1 Guest are viewing this topic.

FUCKYOURBRAIN

  • Newbie
  • *
  • Posts: 2
    • View Profile
Configuring c::b on Mac OS X. Missing SFML libs.
« on: September 10, 2014, 08:56:58 pm »
Hi, there
I'm trying to set up SFML 2.1 with Code::Blocks 13.12 on Mac OS X.

I followed this tutorial http://sfml-dev.org/tutorials/2.1/start-cb.php step by step, created project, but when I tried to build and run this code from tutorial:
#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
    sf::CircleShape shape(100.f);
    shape.setFillColor(sf::Color::Green);

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }

        window.clear();
        window.draw(shape);
        window.display();
    }

    return 0;
}

I got that:


-------------- Build: Debug in cpptest (compiler: GNU GCC Compiler)---------------

g++ -L/Library/SFML-2.1/lib -L/Users/zzzz/Downloads/SFML/SFML-2.1-osx-clang-universal/lib -o bin/Debug/cpptest obj/Debug/main.o   -lsfml-graphics-d -lsfml-window-d -lsfml-system-d
ld: library not found for -lsfml-graphics-d
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Process terminated with status 1 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))

I appreciate any help, that's my first experience of using c::d & sfml

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Configuring c::b on Mac OS X. Missing SFML libs.
« Reply #1 on: September 11, 2014, 09:44:05 am »
Debug binaries are not provided with SFML's SDKs on OS X (it's only on Windows if I'm not mistaken) because there is no incompatibility with release/debug compilation mode. Just use the release one (without `-d`) or build them yourself.
SFML / OS X developer

FUCKYOURBRAIN

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Configuring c::b on Mac OS X. Missing SFML libs.
« Reply #2 on: September 14, 2014, 02:00:17 pm »
Thanks! I've removed d keys, so it worked.