Так что я делаю понг клон, и я в настоящее время компиляции с следующим выводом:Работа с SFML, получая «неразрешенный внешний символ» Выход
1>------ Build started: Project: Pong, Configuration: Debug Win32 ------
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Image::Create(unsigned int,unsigned int,class sf::Color const &)" ([email protected]@[email protected]@[email protected]@@Z) referenced in function "public: void __thiscall Display::load_resources(void)" ([email protected]@@QAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Color::Color(unsigned char,unsigned char,unsigned char,unsigned char)" ([email protected]@@[email protected]@Z) referenced in function "public: void __thiscall Display::load_resources(void)" ([email protected]@@QAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Texture::LoadFromFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class sf::Rect<int> const &)" ([email protected]@[email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@Z) referenced in function "public: void __thiscall Display::load_resources(void)" ([email protected]@@QAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Font::LoadFromFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" ([email protected]@[email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@Z) referenced in function "public: void __thiscall Display::load_resources(void)" ([email protected]@@QAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Sprite::SetTexture(class sf::Texture const &,bool)" ([email protected]@[email protected]@[email protected]@[email protected]) referenced in function "public: void __thiscall Display::loadSprites(void)" ([email protected]@@QAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::Sprite::~Sprite(void)" ([email protected]@@[email protected]) referenced in function "public: void __thiscall Ball::setSprite(class sf::Sprite)" ([email protected]@@[email protected]@@@Z)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class sf::Sprite & __thiscall sf::Sprite::operator=(class sf::Sprite const &)" ([email protected]@@[email protected]@@Z) referenced in function "public: void __thiscall Ball::setSprite(class sf::Sprite)" ([email protected]@@[email protected]@@@Z)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Sprite::Sprite(void)" ([email protected]@@[email protected]) referenced in function "public: __thiscall Ball::Ball(void)" ([email protected]@[email protected])
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Transformable::SetPosition(float,float)" ([email protected]@[email protected]@[email protected]) referenced in function "public: void __thiscall Ball::updateSprite(void)" ([email protected]@@QAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Image::~Image(void)" ([email protected]@@[email protected]) referenced in function [email protected]@[email protected]$0
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Texture::~Texture(void)" ([email protected]@@[email protected]) referenced in function [email protected]@[email protected]$0
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Font::~Font(void)" ([email protected]@@[email protected]) referenced in function [email protected]@[email protected]$0
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Image::Image(void)" ([email protected]@@[email protected]) referenced in function "public: __thiscall Display::Display(void)" ([email protected]@[email protected])
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Texture::Texture(void)" ([email protected]@@[email protected]) referenced in function "public: __thiscall Display::Display(void)" ([email protected]@[email protected])
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Font::Font(void)" ([email protected]@@[email protected]) referenced in function "public: __thiscall Display::Display(void)" ([email protected]@[email protected])
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Sprite::Sprite(class sf::Sprite const &)" ([email protected]@@[email protected]@@Z) referenced in function "public: void __thiscall Game::reset(void)" ([email protected]@@QAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static bool __cdecl sf::Keyboard::IsKeyPressed(enum sf::Keyboard::Key)" ([email protected]@[email protected]@[email protected]@@Z) referenced in function "public: void __thiscall Game::update(void)" ([email protected]@@QAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::Window::~Window(void)" ([email protected]@@[email protected]) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::Close(void)" ([email protected]@[email protected]@QAEXXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::Display(void)" ([email protected]@[email protected]@QAEXXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Window::Window(class sf::VideoMode,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned int,struct sf::ContextSettings const &)" ([email protected]@@[email protected]@[email protected][email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@Z) 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)" ([email protected]@@[email protected]@Z) referenced in function _main
1>C:\Users\Owner\Documents\Visual Studio 2010\Projects\Pong\Debug\Pong.exe : fatal error LNK1120: 22 unresolved externals
Все, что я читал говорит, что я» m неправильно, но у меня есть все файлы, которые мне нужны в разделе include ... Что я делаю неправильно?
файлы заголовков используются во время компиляции, файлы '.lib' требуются во время связи. Вам нужно добавить библиотеку SFML в параметры компоновщика. – hmjd