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

Author Topic: missing sfml-graphics-2.dll  (Read 33023 times)

0 Members and 2 Guests are viewing this topic.

metulburr

  • Newbie
  • *
  • Posts: 49
    • View Profile
    • Email
missing sfml-graphics-2.dll
« on: November 15, 2013, 04:08:25 pm »
I get the error:
missing sfml-graphics-2.dll
when i try to compile SFML under windows. I walked through the tutorial.

Path to SFML
C:\SFML-2.1\

to confirm... in compiler settings for code blocks i changed:
compiler
C:\SFML-2.1\include

linker
C:\SFML-2.1\lib

settings->#defines
SFML_STATIC

linker settings:
sfml-graphics
sfml-window
sfml-system
sfml-network

enabled flag for c++11



windows 8
code blocks mingw
SFML 2.1


I think that was it. I don't really see a problem?
OS Ubuntu 13.04, Arch Linux, Gentoo, Windows 7/8
SFML 2.1
Ati Radeon HD 6770

G.

  • Hero Member
  • *****
  • Posts: 1593
    • View Profile
Re: missing sfml-graphics-2.dll
« Reply #1 on: November 15, 2013, 04:23:58 pm »
If you want to get rid of these DLLs and have SFML directly integrated to your executable, you must link to the static version. Static SFML libraries have the "-s" suffix: "sfml-xxx-s-d" for Debug, and "sfml-xxx-s" for Release.
Or if you want dynamic linking...:
if you linked to the dynamic version of SFML, don't forget to copy the SFML DLLs (they are in <sfml-install-path/bin>) to the directory where your compiled executable is.

metulburr

  • Newbie
  • *
  • Posts: 49
    • View Profile
    • Email
Re: missing sfml-graphics-2.dll
« Reply #2 on: November 15, 2013, 05:02:36 pm »
changing to this however changed no results.
sfml-graphics-s
sfml-window-s
sfml-system-s
sfml-network-s
OS Ubuntu 13.04, Arch Linux, Gentoo, Windows 7/8
SFML 2.1
Ati Radeon HD 6770

wintertime

  • Sr. Member
  • ****
  • Posts: 255
    • View Profile
Re: missing sfml-graphics-2.dll
« Reply #3 on: November 15, 2013, 05:08:52 pm »
Are you compiling the Debug version in code::blocks while having only the Release version configured in the project? Debug version ends with "-d".
Be sure to check both build types in the tree view of the project build settings.

metulburr

  • Newbie
  • *
  • Posts: 49
    • View Profile
    • Email
Re: missing sfml-graphics-2.dll
« Reply #4 on: November 15, 2013, 05:17:48 pm »
the projects build settings are identical to the compilers build settings
OS Ubuntu 13.04, Arch Linux, Gentoo, Windows 7/8
SFML 2.1
Ati Radeon HD 6770

wintertime

  • Sr. Member
  • ****
  • Posts: 255
    • View Profile
Re: missing sfml-graphics-2.dll
« Reply #5 on: November 15, 2013, 05:29:29 pm »
Settings menu->Compiler is not the same as project settings, its just a default and does not allow adding different library versions for debug and release. You should not put sfml libraries there.
Instead rightclick on the project name in the opened project tree and open the Build options. There is a small tree for global project settings, Debug settings and Release settings.

metulburr

  • Newbie
  • *
  • Posts: 49
    • View Profile
    • Email
Re: missing sfml-graphics-2.dll
« Reply #6 on: November 15, 2013, 05:34:28 pm »
ok

Well the projects build options for both the Debug and Release are the same as the OP, with the addition of the -s suffixes
« Last Edit: November 15, 2013, 05:46:40 pm by metulburr »
OS Ubuntu 13.04, Arch Linux, Gentoo, Windows 7/8
SFML 2.1
Ati Radeon HD 6770

wintertime

  • Sr. Member
  • ****
  • Posts: 255
    • View Profile
Re: missing sfml-graphics-2.dll
« Reply #7 on: November 15, 2013, 05:43:02 pm »
Then you may want to change the Debug options to include the "-d" and look if you put the others under Release and not in the tree root named after the project. ;)

metulburr

  • Newbie
  • *
  • Posts: 49
    • View Profile
    • Email
Re: missing sfml-graphics-2.dll
« Reply #8 on: November 15, 2013, 05:52:07 pm »
ok so now in the tree:
project -> build options - > project_name has OP settings with no suffix
project -> build options - > project_name -> Debug has OP settings with -d suffix
project -> build options - > project_name -> Release has OP settings with -s suffix

but i still get the same error
« Last Edit: November 15, 2013, 05:53:50 pm by metulburr »
OS Ubuntu 13.04, Arch Linux, Gentoo, Windows 7/8
SFML 2.1
Ati Radeon HD 6770

metulburr

  • Newbie
  • *
  • Posts: 49
    • View Profile
    • Email
Re: missing sfml-graphics-2.dll
« Reply #9 on: November 15, 2013, 06:12:57 pm »
EDIT:
sorry.... i didnt see the build target drop down box option to change from debug to release. Changing that stopped the original error.

However now i get 50 errors with the example code given:
#include <SFML/Window.hpp>
#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;
}
 

compiling:
mingw32-g++.exe -LC:\SFML-2.1\lib -LC:\SFML-2.1\lib -LC:\SFML-2.1\lib  -o bin\Release\test.exe obj\Release\main.o   -s  -lsfml-graphics -lsfml-window -lsfml-system -lsfml-audio -lsfml-network -lsfml-graphics-s -lsfml-window-s -lsfml-system-s -lsfml-audio-s -lsfml-network-s

I am not sure if this is related to the changes i made to the projects links etc. i nthis thread or someething completely different at this point now.
« Last Edit: November 15, 2013, 06:16:13 pm by metulburr »
OS Ubuntu 13.04, Arch Linux, Gentoo, Windows 7/8
SFML 2.1
Ati Radeon HD 6770

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: missing sfml-graphics-2.dll
« Reply #10 on: November 15, 2013, 06:42:47 pm »
Uhm why are you link the dynamic AND static libraries at the same time?
You should only link against on or the other. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

metulburr

  • Newbie
  • *
  • Posts: 49
    • View Profile
    • Email
Re: missing sfml-graphics-2.dll
« Reply #11 on: November 15, 2013, 08:24:14 pm »
I thought the dynamic linking was just coping the dll's over to the directory with the executable, and that the -d suffix was for debug? How am i doing both?
« Last Edit: November 15, 2013, 08:27:07 pm by metulburr »
OS Ubuntu 13.04, Arch Linux, Gentoo, Windows 7/8
SFML 2.1
Ati Radeon HD 6770

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: missing sfml-graphics-2.dll
« Reply #12 on: November 15, 2013, 08:39:32 pm »
You should (re-)read the official tutorial, everything is explained exactly.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

metulburr

  • Newbie
  • *
  • Posts: 49
    • View Profile
    • Email
Re: missing sfml-graphics-2.dll
« Reply #13 on: November 15, 2013, 10:07:58 pm »
I dont know where else to go as you point me to the tutorial in which in my perspective (at this point now) follows the tutorials to a T.  I've reread the tutorial again this time, but i dont see a difference in my setup as opposed to the tutorials.

It took me less than 60 seconds to install via linux, and in windows i have been messing around with it all day.
« Last Edit: November 15, 2013, 10:10:20 pm by metulburr »
OS Ubuntu 13.04, Arch Linux, Gentoo, Windows 7/8
SFML 2.1
Ati Radeon HD 6770

Sqasher

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: missing sfml-graphics-2.dll
« Reply #14 on: November 15, 2013, 11:22:33 pm »
If you want to link dynamically you link to sfml-graphics, sfml-window, sfml-system, sfml-audio, sfml-network and put the .dlls into the directory of the executable. For the debug version you link against the -d libs and put the -d.dll files into the directory.

If you want to link statically you only link to sfml-graphics-s, sfml-window-s, sfml-system-s, sfml-audio-s, sfml-network-s. For the debug version you link against the -d libs.

Don't mix static and dynamic linking.

 

anything