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

Author Topic: I get an error when i try to run code.  (Read 2180 times)

0 Members and 2 Guests are viewing this topic.

Stefan122

  • Newbie
  • *
  • Posts: 3
    • View Profile
I get an error when i try to run code.
« on: October 27, 2018, 12:26:03 pm »
I am new to sfml. I followed the tutorial that the site provides and i get errors when i try to run the code that tests if i did everything corectly. I tried many times but the same error. Does anybody know the problem?

||=== Build: Debug in test (compiler: GNU GCC Compiler) ===|
E:\jocuri\C++\SFML-2.5.1\lib\libsfml-graphics-s-d.a(Color.cpp.obj)||In function `ZN2sf5ColorC2Ehhhh':|
D:\Programming\C++\Releases\_Sources\SFML\src\SFML\Graphics\Color.cpp|60|multiple definition of `sf::Color::Color(unsigned char, unsigned char, unsigned char, unsigned char)'|
E:\jocuri\C++\SFML-2.5.1\lib\libsfml-graphics-d.a(d000201.o)|| first defined here|
E:\jocuri\C++\SFML-2.5.1\lib\libsfml-graphics-s-d.a(CircleShape.cpp.obj)||In function `ZN2sf7Vector2IfEC1Eff':|
D:\Programming\C++\Releases\_Sources\SFML\src\SFML\Graphics\CircleShape.cpp|35|multiple definition of `sf::CircleShape::CircleShape(float, unsigned int)'|
E:\jocuri\C++\SFML-2.5.1\lib\libsfml-graphics-d.a(d000024.o)|| first defined here|
E:\jocuri\C++\SFML-2.5.1\lib\libsfml-graphics-s-d.a(Shape.cpp.obj)||In function `ZN2sf5ShapeD2Ev':|
D:\Programming\C++\Releases\_Sources\SFML\src\SFML\Graphics\Shape.cpp|58|multiple definition of `sf::Shape::~Shape()'|
E:\jocuri\C++\SFML-2.5.1\lib\libsfml-graphics-d.a(d000235.o)|| first defined here|
E:\jocuri\C++\SFML-2.5.1\lib\libsfml-graphics-s-d.a(Shape.cpp.obj)||In function `ZN2sf5Shape12setFillColorERKNS_5ColorE':|
D:\Programming\C++\Releases\_Sources\SFML\src\SFML\Graphics\Shape.cpp|102|multiple definition of `sf::Shape::setFillColor(sf::Color const&)'|
E:\jocuri\C++\SFML-2.5.1\lib\libsfml-graphics-d.a(d000222.o)|| first defined here|
E:\jocuri\C++\SFML-2.5.1\lib\libsfml-graphics-s-d.a(RenderTarget.cpp.obj)||In function `ZN2sf12RenderTarget5clearERKNS_5ColorE':|
D:\Programming\C++\Releases\_Sources\SFML\src\SFML\Graphics\RenderTarget.cpp|146|multiple definition of `sf::RenderTarget::clear(sf::Color const&)'|
E:\jocuri\C++\SFML-2.5.1\lib\libsfml-graphics-d.a(d000067.o)|| first defined here|
E:\jocuri\C++\SFML-2.5.1\lib\libsfml-graphics-s-d.a(RenderTarget.cpp.obj)||In function `ZN2sf12RenderTarget4drawERKNS_8DrawableERKNS_12RenderStatesE':|
D:\Programming\C++\Releases\_Sources\SFML\src\SFML\Graphics\RenderTarget.cpp|240|multiple definition of `sf::RenderTarget::draw(sf::Drawable const&, sf::RenderStates const&)'|
E:\jocuri\C++\SFML-2.5.1\lib\libsfml-graphics-d.a(d000066.o)|| first defined here|
E:\jocuri\C++\SFML-2.5.1\lib\libsfml-window-s-d.a(Window.cpp.obj)||In function `ZN2sf6Window5closeEv':|
D:\Programming\C++\Releases\_Sources\SFML\src\SFML\Window\Window.cpp|153|multiple definition of `sf::Window::close()'|
E:\jocuri\C++\SFML-2.5.1\lib\libsfml-window-d.a(d000052.o)|| first defined here|
E:\jocuri\C++\SFML-2.5.1\lib\libsfml-window-s-d.a(Window.cpp.obj)||In function `ZNK2sf6Window6isOpenEv':|
D:\Programming\C++\Releases\_Sources\SFML\src\SFML\Window\Window.cpp|170|multiple definition of `sf::Window::isOpen() const'|
E:\jocuri\C++\SFML-2.5.1\lib\libsfml-window-d.a(d000112.o)|| first defined here|
E:\jocuri\C++\SFML-2.5.1\lib\libsfml-window-s-d.a(Window.cpp.obj)||In function `ZN2sf6Window9pollEventERNS_5EventE':|
D:\Programming\C++\Releases\_Sources\SFML\src\SFML\Window\Window.cpp|186|multiple definition of `sf::Window::pollEvent(sf::Event&)'|
E:\jocuri\C++\SFML-2.5.1\lib\libsfml-window-d.a(d000061.o)|| first defined here|
E:\jocuri\C++\SFML-2.5.1\lib\libsfml-window-s-d.a(Window.cpp.obj)||In function `ZN2sf6Window7displayEv':|
D:\Programming\C++\Releases\_Sources\SFML\src\SFML\Window\Window.cpp|373|multiple definition of `sf::Window::display()'|
E:\jocuri\C++\SFML-2.5.1\lib\libsfml-window-d.a(d000055.o)|| first defined here|
E:\jocuri\C++\SFML-2.5.1\lib\libsfml-window-s-d.a(VideoMode.cpp.obj)||In function `ZN2sf9VideoModeC2Ejjj':|
D:\Programming\C++\Releases\_Sources\SFML\src\SFML\Window\VideoMode.cpp|47|multiple definition of `sf::VideoMode::VideoMode(unsigned int, unsigned int, unsigned int)'|
E:\jocuri\C++\SFML-2.5.1\lib\libsfml-window-d.a(d000098.o)|| first defined here|
E:\jocuri\C++\SFML-2.5.1\lib\libsfml-system-s-d.a(String.cpp.obj)||In function `ZN2sf6StringC2EPKcRKSt6locale':|
D:\Programming\C++\Releases\_Sources\SFML\src\SFML\System\String.cpp|68|multiple definition of `sf::String::String(char const*, std::locale const&)'|
E:\jocuri\C++\SFML-2.5.1\lib\libsfml-system-d.a(d000060.o)|| first defined here|
E:\jocuri\C++\SFML-2.5.1\lib\libsfml-graphics-s-d.a(CircleShape.cpp.obj)||In function `ZN2sf11CircleShapeC2Efj':|
D:\Programming\C++\Releases\_Sources\SFML\src\SFML\Graphics\CircleShape.cpp|35|undefined reference to `__gxx_personality_sj0'|
D:\Programming\C++\Releases\_Sources\SFML\src\SFML\Graphics\CircleShape.cpp|35|undefined reference to `_Unwind_SjLj_Register'|
D:\Programming\C++\Releases\_Sources\SFML\src\SFML\Graphics\CircleShape.cpp|37|undefined reference to `_Unwind_SjLj_Resume'|
D:\Programming\C++\Releases\_Sources\SFML\src\SFML\Graphics\CircleShape.cpp|37|undefined reference to `_Unwind_SjLj_Unregister'|
E:\jocuri\C++\SFML-2.5.1\lib\libsfml-graphics-s-d.a(Shape.cpp.obj)||In function `ZN2sf5ShapeD2Ev':|
D:\Programming\C++\Releases\_Sources\SFML\src\SFML\Graphics\Shape.cpp|58|undefined reference to `__gxx_personality_sj0'|
D:\Programming\C++\Releases\_Sources\SFML\src\SFML\Graphics\Shape.cpp|58|undefined reference to `_Unwind_SjLj_Register'|
D:\Programming\C++\Releases\_Sources\SFML\src\SFML\Graphics\Shape.cpp|58|undefined reference to `_Unwind_SjLj_Resume'|
D:\Programming\C++\Releases\_Sources\SFML\src\SFML\Graphics\Shape.cpp|58|undefined reference to `_Unwind_SjLj_Unregister'|
E:\jocuri\C++\SFML-2.5.1\lib\libsfml-graphics-s-d.a(Shape.cpp.obj)||In function `ZN2sf5ShapeC2Ev':|
D:\Programming\C++\Releases\_Sources\SFML\src\SFML\Graphics\Shape.cpp|160|undefined reference to `__gxx_personality_sj0'|
D:\Programming\C++\Releases\_Sources\SFML\src\SFML\Graphics\Shape.cpp|160|undefined reference to `_Unwind_SjLj_Register'|
D:\Programming\C++\Releases\_Sources\SFML\src\SFML\Graphics\Shape.cpp|169|undefined reference to `_Unwind_SjLj_Resume'|
D:\Programming\C++\Releases\_Sources\SFML\src\SFML\Graphics\Shape.cpp|169|undefined reference to `_Unwind_SjLj_Unregister'|
E:\jocuri\C++\SFML-2.5.1\lib\libsfml-graphics-s-d.a(Shape.cpp.obj)||In function `ZN2sf11VertexArrayD1Ev':|
D:\Programming\C++\Releases\_Sources\SFML\include\SFML\Graphics\VertexArray.hpp|45|undefined reference to `__gxx_personality_sj0'|
D:\Programming\C++\Releases\_Sources\SFML\include\SFML\Graphics\VertexArray.hpp|45|undefined reference to `_Unwind_SjLj_Register'|
D:\Programming\C++\Releases\_Sources\SFML\include\SFML\Graphics\VertexArray.hpp|45|undefined reference to `_Unwind_SjLj_Resume'|
D:\Programming\C++\Releases\_Sources\SFML\include\SFML\Graphics\VertexArray.hpp|45|undefined reference to `_Unwind_SjLj_Unregister'|
E:\jocuri\C++\SFML-2.5.1\lib\libsfml-graphics-s-d.a(Shape.cpp.obj)||In function `ZNSt6vectorIN2sf6VertexESaIS1_EED1Ev':|
C:\Dev\MinGW32-TDM510\lib\gcc\mingw32\5.1.0\include\c++\bits\stl_vector.h|423|undefined reference to `__gxx_personality_sj0'|
C:\Dev\MinGW32-TDM510\lib\gcc\mingw32\5.1.0\include\c++\bits\stl_vector.h|423|undefined reference to `_Unwind_SjLj_Register'|
C:\Dev\MinGW32-TDM510\lib\gcc\mingw32\5.1.0\include\c++\bits\stl_vector.h|425|undefined reference to `_Unwind_SjLj_Resume'|
C:\Dev\MinGW32-TDM510\lib\gcc\mingw32\5.1.0\include\c++\bits\stl_vector.h|425|undefined reference to `_Unwind_SjLj_Unregister'|
E:\jocuri\C++\SFML-2.5.1\lib\libsfml-graphics-s-d.a(Shape.cpp.obj)||In function `ZNSt12_Vector_baseIN2sf6VertexESaIS1_EED2Ev':|
C:\Dev\MinGW32-TDM510\lib\gcc\mingw32\5.1.0\include\c++\bits\stl_vector.h|159|undefined reference to `__gxx_personality_sj0'|
C:\Dev\MinGW32-TDM510\lib\gcc\mingw32\5.1.0\include\c++\bits\stl_vector.h|159|undefined reference to `_Unwind_SjLj_Register'|
C:\Dev\MinGW32-TDM510\lib\gcc\mingw32\5.1.0\include\c++\bits\stl_vector.h|161|undefined reference to `_Unwind_SjLj_Resume'|
C:\Dev\MinGW32-TDM510\lib\gcc\mingw32\5.1.0\include\c++\bits\stl_vector.h|161|undefined reference to `_Unwind_SjLj_Unregister'|
E:\jocuri\C++\SFML-2.5.1\lib\libsfml-graphics-s-d.a(VertexArray.cpp.obj)||In function `ZN2sf11VertexArrayC2Ev':|
D:\Programming\C++\Releases\_Sources\SFML\src\SFML\Graphics\VertexArray.cpp|35|undefined reference to `__gxx_personality_sj0'|
D:\Programming\C++\Releases\_Sources\SFML\src\SFML\Graphics\VertexArray.cpp|35|undefined reference to `_Unwind_SjLj_Register'|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build failed: 50 error(s), 0 warning(s) (0 minute(s), 4 second(s)) ===|

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: I get an error when i try to run code.
« Reply #1 on: October 27, 2018, 06:19:58 pm »
You're linking dynamic and static libraries at the same time. Pick one or the other, but not both. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Stefan122

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: I get an error when i try to run code.
« Reply #2 on: October 27, 2018, 07:00:10 pm »
You're linking dynamic and static libraries at the same time. Pick one or the other, but not both. ;)
I tried each of them separately but still the same.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: I get an error when i try to run code.
« Reply #3 on: October 27, 2018, 08:52:14 pm »
Can't be the same errors if you only linked one version.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Stefan122

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: I get an error when i try to run code.
« Reply #4 on: October 27, 2018, 10:33:56 pm »
Can't be the same errors if you only linked one version.
Maybe, but it looks to me to as the same error.