so i decided to try sfml, and i used the sample from the website to see if its working. heres the code

////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Window.hpp>


////////////////////////////////////////////////////////////
/// Entry point of application
///
/// \return Application exit code
///
////////////////////////////////////////////////////////////
int main()
{
    // Create the main window
    sf::Window App(sf::VideoMode(800, 600, 32), "SFML Window");

    // Start main loop
    bool Running = true;
    while (Running)
    {
        App.Display();
    }

    return EXIT_SUCCESS;
}

Ive setup sfml with codeblocks correctly i believe, and i put all of the windows .dll in the folder.
but i keep getting errors
on line 17,23, and 26
the errors are saying theyre an undefined reference?

Recommended Answers

All 8 Replies

Have you checked this page on how to install it on code Blocks ?

Have you checked this page on how to install it on code Blocks?

Yes, several times. i've done everything on that page, and i dont understand why it dont work!

Try compiling the code upto sf::Window App(sf::VideoMode(800, 600, 32), "SFML Window");. See if it works or not.

Nope, still get error on line 17

////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Window.hpp>


////////////////////////////////////////////////////////////
/// Entry point of application
///
/// \return Application exit code
///
////////////////////////////////////////////////////////////
int main()
{
    // Create the main window

    sf::Window App(sf::VideoMode(800, 600, 32), "SFML Window");
}

this is what you wanted me to enter right?

Nevermind, fixed that problem. but now its saying ' cant open because libgcc_s_dw1-2.dll is missing from your computer, try re dwnloading the program'

i looked in my compliers bin but i only found libgcc_s_sjlj-1.dll

ALL help appreciated :/

try re dwnloading the program'

Do this. Hope it fixes all errors.

I fixed it. i downloaded the dll from a website and added it to my bin folder.

I fixed it. i downloaded the dll from a website and added it to my bin folder.

Downloading dlls from random sites is not a very wise thing to do. You never know what kind of code these dlls may contain. I'm talking about security issues. Your pc could as well be monitored by someone right now.

but now its saying ' cant open because libgcc_s_dw1-2.dll is missing from your computer, try re dwnloading the program'

This is what I meant here by saying that you don't have the correct version of MinGW. (Also, I just noticed that the SFML instructions link I posted is for SFML 1.2. The ones for SFML 1.6 are here.)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.