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

Author Topic: LNK2001 error although I have linked to all the libraries?  (Read 1288 times)

0 Members and 1 Guest are viewing this topic.

Chubak

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
LNK2001 error although I have linked to all the libraries?
« on: November 29, 2018, 12:13:12 am »
I get LNK2001 error although I have linked to all the libraries.
 Here's how my dependencies look like:



And here are the errors I'm getting:


1>------ Build started: Project: SFML_Test, Configuration: Release Win32 ------
1>Main.obj : error LNK2001: unresolved external symbol "public: static class sf::RenderStates const sf::RenderStates::Default" (?Default@RenderStates@sf@@2V12@B)
1>Main.obj : error LNK2001: unresolved external symbol "public: __thiscall sf::CircleShape::CircleShape(float,unsigned int)" (??0CircleShape@sf@@QAE@MI@Z)
1>Main.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall sf::RenderWindow::~RenderWindow(void)" (??1RenderWindow@sf@@UAE@XZ)
1>Main.obj : error LNK2001: 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)
1>Main.obj : error LNK2001: unresolved external symbol "public: __thiscall sf::Color::Color(unsigned char,unsigned char,unsigned char,unsigned char)" (??0Color@sf@@QAE@EEEE@Z)
1>Main.obj : error LNK2001: unresolved external symbol "public: void __thiscall sf::Window::display(void)" (?display@Window@sf@@QAEXXZ)
1>Main.obj : error LNK2001: unresolved external symbol "public: bool __thiscall sf::Window::pollEvent(class sf::Event &)" (?pollEvent@Window@sf@@QAE_NAAVEvent@2@@Z)
1>Main.obj : error LNK2001: unresolved external symbol "public: bool __thiscall sf::Window::isOpen(void)const " (?isOpen@Window@sf@@QBE_NXZ)
1>Main.obj : error LNK2001: unresolved external symbol "public: void __thiscall sf::Window::close(void)" (?close@Window@sf@@QAEXXZ)
1>Main.obj : error LNK2001: unresolved external symbol "public: static class sf::Color const sf::Color::Green" (?Green@Color@sf@@2V12@B)
1>Main.obj : error LNK2001: 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)
1>Main.obj : error LNK2001: unresolved external symbol "public: void __thiscall sf::RenderTarget::clear(class sf::Color const &)" (?clear@RenderTarget@sf@@QAEXABVColor@2@@Z)
1>Main.obj : error LNK2001: unresolved external symbol "public: void __thiscall sf::Shape::setFillColor(class sf::Color const &)" (?setFillColor@Shape@sf@@QAEXABVColor@2@@Z)
1>Main.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall sf::Shape::~Shape(void)" (??1Shape@sf@@UAE@XZ)
1>Main.obj : error LNK2001: unresolved external symbol "public: __thiscall sf::String::String(char const *,class std::locale const &)" (??0String@sf@@QAE@PBDABVlocale@std@@@Z)
1>Main.obj : error LNK2001: unresolved external symbol "public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (??0VideoMode@sf@@QAE@III@Z)
1>C:\Users\Chubak\Documents\Visual Studio 2017\Projects\SFML_Test\Release\SFML_Test.exe : fatal error LNK1120: 16 unresolved externals
1>Done building project "SFML_Test.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 

Why? I have linked to ALL the libraries. What could be the issue here?

Chubak

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Re: LNK2001 error although I have linked to all the libraries?
« Reply #1 on: November 29, 2018, 12:28:23 am »
Fixed it! It seems like the new release are x64, and I was using x86.