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

Author Topic: SFML-2.3 error  (Read 1921 times)

0 Members and 3 Guests are viewing this topic.

botics

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
SFML-2.3 error
« on: June 24, 2015, 03:35:08 pm »
Hi!
Recently I downloaded SFML-2.3 and I can't get to work.
With SFML-2.1 everything works fine but with the 2.3 libs and include files it doesn't work.
I use Visual Studio 2013 on a x64 machine.

Anybody has any idea what's the problem?

This is the code and the errors.
#include <SFML/Graphics.hpp>

int main()
{

        sf::RenderWindow window(sf::VideoMode(400, 400), "saf");

        while (window.isOpen())
        {
                window.clear();
                window.display();
        }

}

1>------ Build started: Project: SFML-2.3-test, Configuration: Debug Win32 ------
1>  main.cpp
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::String::String(char const *,class std::locale const &)" (__imp_??0String@sf@@QAE@PBDABVlocale@std@@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::String::~String(void)" (__imp_??1String@sf@@QAE@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (__imp_??0VideoMode@sf@@QAE@III@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Window::isOpen(void)const " (__imp_?isOpen@Window@sf@@QBE_NXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::display(void)" (__imp_?display@Window@sf@@QAEXXZ) referenced in function _main
1>main.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>main.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>main.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>main.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>C:\Users\Boti\Desktop\Projektek\C++\SFML\SFML-2.3-test\Debug\SFML-2.3-test.exe : fatal error LNK1120: 9 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

And here are my settings.



eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: SFML-2.3 error
« Reply #1 on: June 24, 2015, 05:03:36 pm »
Can you provide the verbose build command?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

botics

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
Re: SFML-2.3 error
« Reply #2 on: June 24, 2015, 05:25:08 pm »
This?
cl /c /I"E:\Programok\SFML-2.3\include" /ZI /W3 /WX- /sdl /Od /Oy- /D _MBCS /Gm /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"Debug\\" /Fd"Debug\vc120.pdb" /Gd /TP /analyze- /errorReport:prompt main.cpp

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
AW: SFML-2.3 error
« Reply #3 on: June 24, 2015, 05:43:45 pm »
Well this is missing the wohle linking bit.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

botics

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
Re: SFML-2.3 error
« Reply #4 on: June 24, 2015, 05:47:02 pm »
I downloaded the 32-bit version of SFML and now it works fine.

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: SFML-2.3 error
« Reply #5 on: June 24, 2015, 09:43:48 pm »
From your screenshots, it looks like you were trying to compile in 32-bit mode so that'll be why your 32-bit download works.
If you want to use the 64-bit SFML, you'll need to use it in a 64-bit "platform".
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

 

anything