Help with SFML

  • (2 Pages)
  • +
  • 1
  • 2

19 Replies - 3968 Views - Last Post: 11 October 2014 - 06:16 AM Rate Topic: -----

#1 Hengad   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 25
  • Joined: 01-October 14

Help with SFML

Posted 06 October 2014 - 08:36 AM

I have tried to get SFML work with Code::Blocks and I did all, what tutorial said me to do. It gave me some errors and I tried to do _everything_ again. But still Im getting errors. Can someone help?

Here is image of my errors:
http://puu.sh/c1Hmc/e63eabdd4b.png

Here is my code:
http://puu.sh/c1Hx4/1207698124.png

Is This A Good Question/Topic? 0
  • +

Replies To: Help with SFML

#2 vividexstance   User is offline

  • Tiocfaidh ár lá
  • member icon

Reputation: 792
  • View blog
  • Posts: 2,877
  • Joined: 31-December 10

Re: Help with SFML

Posted 06 October 2014 - 09:53 AM

Could please just copy+paste the error messages and your code? Some people don't like clicking outside links.

This post has been edited by vividexstance: 06 October 2014 - 09:53 AM

Was This Post Helpful? 0
  • +
  • -

#3 Hengad   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 25
  • Joined: 01-October 14

Re: Help with SFML

Posted 06 October 2014 - 10:19 AM

View Postvividexstance, on 06 October 2014 - 09:53 AM, said:

Could please just copy+paste the error messages and your code? Some people don't like clicking outside links.

Umm... I dont know how to edit posts :bigsmile:

Still, here is code: Posted Image

And here is errors: Posted Image
Was This Post Helpful? 0
  • +
  • -

#4 jimblumberg   User is offline

  • member icon

Reputation: 5568
  • View blog
  • Posts: 17,215
  • Joined: 25-December 09

Re: Help with SFML

Posted 06 October 2014 - 10:23 AM

Please post your code and error messages as text, inside code tags.

:code:


Jim
Was This Post Helpful? 0
  • +
  • -

#5 Hengad   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 25
  • Joined: 01-October 14

Re: Help with SFML

Posted 06 October 2014 - 10:31 AM

I cant copy errors, you cant do it in Code::Blocks.

Here is code:
#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;
}


Was This Post Helpful? 0
  • +
  • -

#6 jimblumberg   User is offline

  • member icon

Reputation: 5568
  • View blog
  • Posts: 17,215
  • Joined: 25-December 09

Re: Help with SFML

Posted 06 October 2014 - 10:51 AM

Quote

I cant copy errors, you cant do it in Code::Blocks.

Why can't you copy your errors from code blocks, it works for me.

Quote

||=== c++homework, Debug ===|
main.cpp|1|fatal error: SFML/Graphics.hpp: No such file or directory|
||=== Build finished: 1 errors, 0 warnings (0 minutes, 0 seconds) ===|


Jim
Was This Post Helpful? 0
  • +
  • -

#7 #define   User is offline

  • Duke of Err
  • member icon

Reputation: 1854
  • View blog
  • Posts: 6,676
  • Joined: 19-February 09

Re: Help with SFML

Posted 06 October 2014 - 11:17 AM

Hi, did you have a look at :

SFML 2.0 unwind resume

Do you have link to tutorial.
Was This Post Helpful? 0
  • +
  • -

#8 Hengad   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 25
  • Joined: 01-October 14

Re: Help with SFML

Posted 07 October 2014 - 04:39 AM

View Postjimblumberg, on 06 October 2014 - 10:51 AM, said:

Quote

I cant copy errors, you cant do it in Code::Blocks.

Why can't you copy your errors from code blocks, it works for me.

Quote

||=== c++homework, Debug ===|
main.cpp|1|fatal error: SFML/Graphics.hpp: No such file or directory|
||=== Build finished: 1 errors, 0 warnings (0 minutes, 0 seconds) ===|


Jim

Oh, there is another page where you can copy it. My bad, sorry. There it is:
-------------- Build: Debug in SfmlProject (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -L"C:\Users\Hengad\Desktop\MyPrograms\c++\SDL\SDL-1.2.15\lib" -L"C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib"  -o bin\Debug\SfmlProject.exe obj\Debug\main.o   -lsfml-system  -lsfml-graphics-s-d -lsfml-window-s-d -lsfml-system-s-d 
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-system-s-d.a(String.cpp.obj): In function `ZN2sf6StringC2EPKcRKSt6locale':
D:/developpement/sfml/sfml/src/SFML/System/String.cpp:68: multiple definition of `sf::String::String(char const*, std::locale const&)'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-system.a(d000051.o):(/>/>.text+0x0): first defined here
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(CircleShape.cpp.obj): In function `ZN2sf11CircleShapeC2Efj':
D:/developpement/sfml/sfml/src/SFML/Graphics/CircleShape.cpp:37: undefined reference to `_Unwind_Resume'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(CircleShape.cpp.obj):CircleShape.cpp:(.eh_frame+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(Renderwindow.cpp.obj): In function `ZN2sf12RenderWindowC2Ev':
D:/developpement/sfml/sfml/src/SFML/Graphics/Renderwindow.cpp:35: undefined reference to `_Unwind_Resume'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(Renderwindow.cpp.obj): In function `ZN2sf12RenderWindowC2ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE':
D:/developpement/sfml/sfml/src/SFML/Graphics/Renderwindow.cpp:42: undefined reference to `_Unwind_Resume'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(Renderwindow.cpp.obj): In function `ZN2sf12RenderWindowC2EP6HWND__RKNS_15ContextSettingsE':
D:/developpement/sfml/sfml/src/SFML/Graphics/Renderwindow.cpp:50: undefined reference to `_Unwind_Resume'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(Renderwindow.cpp.obj): In function `ZN2sf12RenderWindowD2Ev':
D:/developpement/sfml/sfml/src/SFML/Graphics/Renderwindow.cpp:58: undefined reference to `_Unwind_Resume'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(Renderwindow.cpp.obj): In function `ZNK2sf12RenderWindow7captureEv':
D:/developpement/sfml/sfml/src/SFML/Graphics/Renderwindow.cpp:98: undefined reference to `_Unwind_Resume'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(Renderwindow.cpp.obj):D/>/>:/programmes/mingw32-4.7/bin/../lib/gcc/mingw32/4.7.2/include/c++/bits/stl_vector.h:404: more undefined references to `_Unwind_Resume' follow
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(Renderwindow.cpp.obj):Renderwindow.cpp:(.eh_frame+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(Renderwindow.cpp.obj):Renderwindow.cpp:(.eh_frame$_ZNSt6vectorIhSaIhEED1Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(Renderwindow.cpp.obj):Renderwindow.cpp:(.eh_frame$_ZNSt6vectorIhSaIhEEC1EjRKhRKS0_+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(Renderwindow.cpp.obj):Renderwindow.cpp:(.eh_frame$_ZNSt12_Vector_baseIhSaIhEED2Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(Renderwindow.cpp.obj):Renderwindow.cpp:(.eh_frame$_ZNSt12_Vector_baseIhSaIhEEC2EjRKS0_+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(Shape.cpp.obj): In function `ZN2sf5ShapeD2Ev':
D:/developpement/sfml/sfml/src/SFML/Graphics/Shape.cpp:58: undefined reference to `_Unwind_Resume'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(Shape.cpp.obj): In function `ZN2sf5Shape10setTextureEPKNS_7TextureEb':
D:/developpement/sfml/sfml/src/SFML/Graphics/Shape.cpp:74: undefined reference to `_Unwind_Resume'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(Shape.cpp.obj): In function `ZNK2sf5Shape15getGlobalBoundsEv':
D:/developpement/sfml/sfml/src/SFML/Graphics/Shape.cpp:155: undefined reference to `_Unwind_Resume'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(Shape.cpp.obj): In function `ZN2sf5ShapeC2Ev':
D:/developpement/sfml/sfml/src/SFML/Graphics/Shape.cpp:169: undefined reference to `_Unwind_Resume'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(Shape.cpp.obj): In function `ZN2sf5Shape13updateOutlineEv':
D:/developpement/sfml/sfml/src/SFML/Graphics/Shape.cpp:294: undefined reference to `_Unwind_Resume'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(Shape.cpp.obj):D/>/>:/developpement/sfml/sfml/include/SFML/Graphics/VertexArray.hpp:45: more undefined references to `_Unwind_Resume' follow
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(Shape.cpp.obj):Shape.cpp:(.eh_frame+0x6b): undefined reference to `__gxx_personality_v0'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(Shape.cpp.obj):Shape.cpp:(.eh_frame$_ZN2sf11VertexArrayD1Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(Shape.cpp.obj):Shape.cpp:(.eh_frame$_ZNSt6vectorIN2sf6VertexESaIS1_EED1Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(Shape.cpp.obj):Shape.cpp:(.eh_frame$_ZNSt12_Vector_baseIN2sf6VertexESaIS1_EED2Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(RenderTarget.cpp.obj): In function `ZNK2sf12RenderTarget16mapPixelToCoordsERKNS_7Vector2IiEERKNS_4ViewE':
D:/developpement/sfml/sfml/src/SFML/Graphics/RenderTarget.cpp:120: undefined reference to `_Unwind_Resume'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(RenderTarget.cpp.obj): In function `ZNK2sf12RenderTarget16mapCoordsToPixelERKNS_7Vector2IfEERKNS_4ViewE':
D:/developpement/sfml/sfml/src/SFML/Graphics/RenderTarget.cpp:141: undefined reference to `_Unwind_Resume'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(RenderTarget.cpp.obj): In function `ZN2sf12RenderTarget10initializeEv':
D:/developpement/sfml/sfml/src/SFML/Graphics/RenderTarget.cpp:331: undefined reference to `_Unwind_Resume'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(RenderTarget.cpp.obj): In function `ZN2sf12RenderTarget16applyCurrentViewEv':
D:/developpement/sfml/sfml/src/SFML/Graphics/RenderTarget.cpp:350: undefined reference to `_Unwind_Resume'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(RenderTarget.cpp.obj):RenderTarget.cpp:(.eh_frame+0x167): undefined reference to `__gxx_personality_v0'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(Image.cpp.obj): In function `ZN2sf5Image16flipHorizontallyEv':
D:/developpement/sfml/sfml/src/SFML/Graphics/Image.cpp:291: undefined reference to `_Unwind_Resume'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(Image.cpp.obj): In function `ZN2sf5Image14flipVerticallyEv':
D:/developpement/sfml/sfml/src/SFML/Graphics/Image.cpp:311: undefined reference to `_Unwind_Resume'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(Image.cpp.obj): In function `ZNKSt6vectorIhSaIhEE5emptyEv':
d:/programmes/mingw32-4.7/bin/../lib/gcc/mingw32/4.7.2/include/c++/bits/stl_vector.h:715: undefined reference to `_Unwind_Resume'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(Image.cpp.obj): In function `ZNSt6vectorIhSaIhEEC1ERKS1_':
d:/programmes/mingw32-4.7/bin/../lib/gcc/mingw32/4.7.2/include/c++/bits/stl_vector.h:309: undefined reference to `_Unwind_Resume'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(Image.cpp.obj): In function `ZNSt6vectorIhSaIhEE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPhS1_EEjRKh':
d:/programmes/mingw32-4.7/bin/../lib/gcc/mingw32/4.7.2/include/c++/bits/vector.tcc:522: undefined reference to `_Unwind_Resume'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(Image.cpp.obj):D/>/>:/programmes/mingw32-4.7/bin/../lib/gcc/mingw32/4.7.2/include/c++/bits/vector.tcc:522: more undefined references to `_Unwind_Resume' follow
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(Image.cpp.obj):Image.cpp:(.eh_frame+0x203): undefined reference to `__gxx_personality_v0'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(Image.cpp.obj):Image.cpp:(.eh_frame$_ZNKSt6vectorIhSaIhEE5emptyEv+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(Image.cpp.obj):Image.cpp:(.eh_frame$_ZNSt6vectorIhSaIhEEC1ERKS1_+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(Image.cpp.obj):Image.cpp:(.eh_frame$_ZNSt6vectorIhSaIhEE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPhS1_EEjRKh+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(GLCheck.cpp.obj): In function `ZN2sf4priv12glCheckErrorEPKcj':
D:/developpement/sfml/sfml/src/SFML/Graphics/GLCheck.cpp:105: undefined reference to `_Unwind_Resume'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(GLCheck.cpp.obj):GLCheck.cpp:(.eh_frame+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(VertexArray.cpp.obj): In function `ZN2sf11VertexArrayC2Ev':
D:/developpement/sfml/sfml/src/SFML/Graphics/VertexArray.cpp:37: undefined reference to `_Unwind_Resume'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(VertexArray.cpp.obj): In function `ZN2sf11VertexArrayC2ENS_13PrimitiveTypeEj':
D:/developpement/sfml/sfml/src/SFML/Graphics/VertexArray.cpp:45: undefined reference to `_Unwind_Resume'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(VertexArray.cpp.obj): In function `ZN2sf11VertexArray6resizeEj':
D:/developpement/sfml/sfml/src/SFML/Graphics/VertexArray.cpp:81: undefined reference to `_Unwind_Resume'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(VertexArray.cpp.obj): In function `ZNSt6vectorIN2sf6VertexESaIS1_EEC1EjRKS1_RKS2_':
d:/programmes/mingw32-4.7/bin/../lib/gcc/mingw32/4.7.2/include/c++/bits/stl_vector.h:294: undefined reference to `_Unwind_Resume'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(VertexArray.cpp.obj): In function `ZNKSt6vectorIN2sf6VertexESaIS1_EE5emptyEv':
d:/programmes/mingw32-4.7/bin/../lib/gcc/mingw32/4.7.2/include/c++/bits/stl_vector.h:715: undefined reference to `_Unwind_Resume'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(VertexArray.cpp.obj):D/>/>:/programmes/mingw32-4.7/bin/../lib/gcc/mingw32/4.7.2/include/c++/bits/stl_vector.h:136: more undefined references to `_Unwind_Resume' follow
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(VertexArray.cpp.obj):VertexArray.cpp:(.eh_frame+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-graphics-s-d.a(VertexArray.cpp.obj):VertexArray.cpp:(.eh_frame$_ZNSt6vectorIN2sf6VertexESaIS1_EEC1EjRKS1_RKS2_+0x13): undefined reference to `__gxx_personality_v0'
Process terminated with status 1 (0 minutes, 4 seconds)
50 errors, 0 warnings (0 minutes, 4 seconds)



View Post#define, on 06 October 2014 - 11:17 AM, said:

Hi, did you have a look at :

SFML 2.0 unwind resume

Do you have link to tutorial.

Yeah, I watched it in youtube: https://www.youtube....h?v=vt0CiMGzBo8

This post has been edited by modi123_1: 05 October 2015 - 09:48 AM
Reason for edit:: removed actual name

Was This Post Helpful? 0
  • +
  • -

#9 Hengad   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 25
  • Joined: 01-October 14

Re: Help with SFML

Posted 09 October 2014 - 06:34 AM

Can someone help?
Was This Post Helpful? 0
  • +
  • -

#10 #define   User is offline

  • Duke of Err
  • member icon

Reputation: 1854
  • View blog
  • Posts: 6,676
  • Joined: 19-February 09

Re: Help with SFML

Posted 09 October 2014 - 06:40 AM

Which SFML 2.1 download package did you download?
Was This Post Helpful? 0
  • +
  • -

#11 Hengad   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 25
  • Joined: 01-October 14

Re: Help with SFML

Posted 09 October 2014 - 06:50 AM

View Post#define, on 09 October 2014 - 06:40 AM, said:

Which SFML 2.1 download package did you download?

First I tried GCC 4.7 TDM (SJLJ) - 32 bits but it didnt work. Then I tried GCC 4.7 MinGW (DW2) - 32 bits but it didnt work either.
Was This Post Helpful? 0
  • +
  • -

#12 #define   User is offline

  • Duke of Err
  • member icon

Reputation: 1854
  • View blog
  • Posts: 6,676
  • Joined: 19-February 09

Re: Help with SFML

Posted 09 October 2014 - 07:28 AM

Do you know what errors you had for GCC 4.7 TDM (SJLJ) - 32 bits?
Was This Post Helpful? 0
  • +
  • -

#13 snoopy11   User is online

  • Engineering ● Software
  • member icon

Reputation: 1477
  • View blog
  • Posts: 4,754
  • Joined: 20-March 10

Re: Help with SFML

Posted 09 October 2014 - 12:29 PM

Hi,

well first of all delete all your GCC 4.7 MinGW (DW2) - 32 bits files

then in your compiler settings you have this on the linker page apparently

sfml-system
sfml-graphics-s-d
sfml-window-s-d
sfml-system-s-d

when you should have

sfml-graphics-s-d
sfml-window-s-d
sfml-system-s-d

do you see the difference.

Also in your Project Menu click on 'Build Options'

in the 'Linker Settings' Tab type int the following again.

sfml-graphics-s-d
sfml-window-s-d
sfml-system-s-d


Then go to Settings->Compiler->Compiler Settings Tab and click on the '#defines' Tab

Type in

SFML_STATIC

Click on the 'Build' menu then click on 'Rebuild'

It should now compile and you can press run.

Regards

Snoopy.
Was This Post Helpful? 0
  • +
  • -

#14 Hengad   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 25
  • Joined: 01-October 14

Re: Help with SFML

Posted 10 October 2014 - 05:11 AM

View Postsnoopy11, on 09 October 2014 - 12:29 PM, said:

Hi,

well first of all delete all your GCC 4.7 MinGW (DW2) - 32 bits files

then in your compiler settings you have this on the linker page apparently

sfml-system
sfml-graphics-s-d
sfml-window-s-d
sfml-system-s-d

when you should have

sfml-graphics-s-d
sfml-window-s-d
sfml-system-s-d

do you see the difference.

Also in your Project Menu click on 'Build Options'

in the 'Linker Settings' Tab type int the following again.

sfml-graphics-s-d
sfml-window-s-d
sfml-system-s-d


Then go to Settings->Compiler->Compiler Settings Tab and click on the '#defines' Tab

Type in

SFML_STATIC

Click on the 'Build' menu then click on 'Rebuild'

It should now compile and you can press run.

Regards

Snoopy.

I did all you said but I get this error:
-------------- Build: Debug in SfmlProject (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -L"C:\Users\Hengad\Desktop\MyPrograms\c++\SDL\SDL-1.2.15\lib" -L"C:\Users\Henry Jaakkola\Desktop\MyPrograms\SFML-2.1\lib"  -o bin\Debug\SfmlProject.exe obj\Debug\main.o   -lsfml-system  -lsfml-graphics-s-d -lsfml-window-s-d -lsfml-system-s-d -lsfml-graphics-s-d -lsfml-window-s-d -lsfml-system-s-d 
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-system-s-d.a(String.cpp.obj): In function `ZN2sf6StringC2EPKcRKSt6locale':
D:/developpement/sfml/sfml/src/SFML/System/String.cpp:68: multiple definition of `sf::String::String(char const*, std::locale const&)'
C:\Users\Hengad\Desktop\MyPrograms\SFML-2.1\lib/libsfml-system.a(d000036.o):(/>/>.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
2 errors, 0 warnings (0 minutes, 0 seconds)
 

This post has been edited by modi123_1: 05 October 2015 - 09:46 AM
Reason for edit:: removed user name.

Was This Post Helpful? 0
  • +
  • -

#15 snoopy11   User is online

  • Engineering ● Software
  • member icon

Reputation: 1477
  • View blog
  • Posts: 4,754
  • Joined: 20-March 10

Re: Help with SFML

Posted 10 October 2014 - 09:02 AM

Hi,

you are not understanding something...

now you are linking to

sfml-system
sfml-graphics-s-d
sfml-windows-s-d
sfml-system-s-d
sfml-graphics-s-d
sfml-windows-s-d
sfml-system-s-d

in that order, which is worse than before.

delete all your linking references and hit Rebuild.

with all the multiple instances of the same libs you are getting those multiple defintion errors.

This should produce no linking and produce a lot of errors if this happens then good.

As explained before in your Project Menu click on 'Build Options'

in the 'Linker Settings' Tab type int the following again.

sfml-graphics-s-d
sfml-window-s-d
sfml-system-s-d


Then go to Settings->Compiler->Compiler Settings Tab and click on the '#defines' Tab

Type in

SFML_STATIC

Click on the 'Build' menu then click on 'Rebuild'

It should now compile and you can press run.


Basically you should be only linking the three static debug libs not four or seven libs to your .exe

Regards

Snoopy.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2