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

Author Topic: Still can't setup SFML  (Read 2505 times)

0 Members and 1 Guest are viewing this topic.

kopaz

  • Newbie
  • *
  • Posts: 6
    • View Profile
Still can't setup SFML
« on: February 21, 2016, 02:21:00 pm »
I've tried anything I could, but I still cannot use SFML.
Here are all the images: http://imgur.com/a/4ldNo
VS 2015 v140
Following this tutorial, with this stable version (Visual C++ 14 (2015) - 32-bit)
Errors:
Quote
1>------ Build started: Project: Project1, Configuration: Debug Win32 ------
1>Source.obj : error LNK2019: unresolved external symbol "public: __thiscall sf::Color::Color(unsigned char,unsigned char,unsigned char,unsigned char)" (??0Color@sf@@QAE@EEEE@Z) referenced in function _main
1>Source.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall sf::Shape::~Shape(void)" (??1Shape@sf@@UAE@XZ) referenced in function "public: virtual __thiscall sf::CircleShape::~CircleShape(void)" (??1CircleShape@sf@@UAE@XZ)
1>Source.obj : error LNK2019: unresolved external symbol "public: void __thiscall sf::Shape::setFillColor(class sf::Color const &)" (?setFillColor@Shape@sf@@QAEXABVColor@2@@Z) referenced in function _main
1>Source.obj : error LNK2019: unresolved external symbol "public: __thiscall sf::CircleShape::CircleShape(float,unsigned int)" (??0CircleShape@sf@@QAE@MI@Z) referenced in function _main
1>Source.obj : error LNK2019: unresolved external symbol "public: void __thiscall sf::RenderTarget::clear(class sf::Color const &)" (?clear@RenderTarget@sf@@QAEXABVColor@2@@Z) referenced in function _main
1>Source.obj : error LNK2019: unresolved external symbol "public: void __thiscall sf::RenderTarget::draw(class sf::Drawable const &,class sf::RenderStates const &)" (?draw@RenderTarget@sf@@QAEXABVDrawable@2@ABVRenderStates@2@@Z) referenced in function _main
1>Source.obj : error LNK2019: unresolved external symbol "public: __thiscall sf::RenderWindow::RenderWindow(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0RenderWindow@sf@@QAE@VVideoMode@1@ABVString@1@IABUContextSettings@1@@Z) referenced in function _main
1>Source.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall sf::RenderWindow::~RenderWindow(void)" (??1RenderWindow@sf@@UAE@XZ) referenced in function _main
1>Source.obj : error LNK2001: unresolved external symbol "public: static class sf::RenderStates const sf::RenderStates::Default" (?Default@RenderStates@sf@@2V12@B)
1>Source.obj : error LNK2001: unresolved external symbol "public: static class sf::Color const sf::Color::Green" (?Green@Color@sf@@2V12@B)
1>C:\Users\u\SFMLproj\p\Debug\p.exe : fatal error LNK1120: 10 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I'm trying to run the code of the tutorial
Project: Empty Project

kopaz

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Still can't setup SFML
« Reply #1 on: February 21, 2016, 04:50:52 pm »
If there's need of more details, I will post them!

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Still can't setup SFML
« Reply #2 on: February 21, 2016, 05:22:09 pm »
Did you defined SFML_STATIC and linked dynamic libs or the other way around.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

kopaz

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Still can't setup SFML
« Reply #3 on: February 21, 2016, 05:51:50 pm »
Did you defined SFML_STATIC and linked dynamic libs or the other way around.
I can't fix it by changing SFML_STATIC to SFML_DYNAMIC or by leaving it blank

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Still can't setup SFML
« Reply #4 on: February 21, 2016, 06:23:32 pm »
SFML_DYNAMIC doesn't exist. Can you provide the verbose build command?

http://www.sfml-dev.org/faq.php#tr-grl-verbose-ide
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

kopaz

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Still can't setup SFML
« Reply #5 on: February 21, 2016, 06:32:32 pm »
Quote
1>  "/OUT:C:\Users\u\SFMLproj\p\Debug\p.exe" /INCREMENTAL "/LIBPATH:C:\SFML-2.3.2\lib" "sfml-audio-d.lib" "sfml-main.lib" "sfml-network-d.lib" "sfml-system-d.lib" "sfml-window-d.lib" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST "/MANIFESTUAC:level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG:FASTLINK "/PDB:C:\Users\u\SFMLproj\p\Debug\p.pdb" /TLBID:1 /DYNAMICBASE /NXCOMPAT "/IMPLIB:C:\Users\u\SFMLproj\p\Debug\p.lib" /MACHINE:X86 Debug\Source.obj
1>Source.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Color::Color(unsigned char,unsigned char,unsigned char,unsigned char)" (__imp_??0Color@sf@@QAE@EEEE@Z) referenced in function _main
1>Source.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Shape::setFillColor(class sf::Color const &)" (__imp_?setFillColor@Shape@sf@@QAEXABVColor@2@@Z) referenced in function _main
1>Source.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::CircleShape::CircleShape(float,unsigned int)" (__imp_??0CircleShape@sf@@QAE@MI@Z) referenced in function _main
1>Source.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::CircleShape::~CircleShape(void)" (__imp_??1CircleShape@sf@@UAE@XZ) referenced in function _main
1>Source.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::RenderTarget::clear(class sf::Color const &)" (__imp_?clear@RenderTarget@sf@@QAEXABVColor@2@@Z) referenced in function _main
1>Source.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::RenderTarget::draw(class sf::Drawable const &,class sf::RenderStates const &)" (__imp_?draw@RenderTarget@sf@@QAEXABVDrawable@2@ABVRenderStates@2@@Z) referenced in function _main
1>Source.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::RenderWindow::RenderWindow(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (__imp_??0RenderWindow@sf@@QAE@VVideoMode@1@ABVString@1@IABUContextSettings@1@@Z) referenced in function _main
1>Source.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::RenderWindow::~RenderWindow(void)" (__imp_??1RenderWindow@sf@@UAE@XZ) referenced in function _main
1>Source.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class sf::RenderStates const sf::RenderStates::Default" (__imp_?Default@RenderStates@sf@@2V12@B)
1>Source.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class sf::Color const sf::Color::Green" (__imp_?Green@Color@sf@@2V12@B)
1>C:\Users\u\SFMLproj\p\Debug\p.exe : fatal error LNK1120: 10 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
That's the output (I left out the comments and copyrights)

kopaz

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Still can't setup SFML
« Reply #6 on: February 22, 2016, 10:35:19 pm »
Still crying for help

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: Still can't setup SFML
« Reply #7 on: February 22, 2016, 11:01:39 pm »
You forgot to link the sfml-graphics lib. ;)

Also no need for triple posting.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

kopaz

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Still can't setup SFML
« Reply #8 on: February 23, 2016, 06:38:38 pm »

 

anything