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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - annaL

Pages: [1]
1
General / link errors
« on: April 04, 2022, 09:24:31 pm »
Hi -

I'm really excited about these tools, but I'm having a little getting started issue. I downloaded SFML-2.5.1-windows-vc14-32-bit from the SFML site. I'm using Visual Studio 2015 which I believe is actually running a 32 bit platform. I made a simple test case that only calls the following:


#include "SFML\Window.hpp"
#include "SFML\Graphics.hpp"

int main()
{
    // Create the main window
    int width = 640;
    int height = 480;
    sf::RenderWindow window(
      sf::VideoMode(width, height),       // size of the client area we want
      L"hdmidisplay"                      // The text to appear on the window title
    );
    return EXIT_SUCCESS;
}

but I get link errors when I compile - pasted below.

Severity   Code   Description   Project   File   Line   Suppression State
Error   LNK1120   5 unresolved externals   SFMLTest   C:\Temp\SFMLTest\x64\Debug\SFMLTest.exe   1   
Error   LNK2019   unresolved external symbol "__declspec(dllimport) public: __cdecl sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (__imp_??0VideoMode@sf@@QEAA@III@Z) referenced in function main   SFMLTest   C:\Temp\SFMLTest\SFMLTest\Window.obj   1   
Error   LNK2019   unresolved external symbol "__declspec(dllimport) public: __cdecl sf::String::~String(void)" (__imp_??1String@sf@@QEAA@XZ) referenced in function main   SFMLTest   C:\Temp\SFMLTest\SFMLTest\Window.obj   1   
Error   LNK2019   unresolved external symbol "__declspec(dllimport) public: __cdecl sf::String::String(wchar_t const *)" (__imp_??0String@sf@@QEAA@PEB_W@Z) referenced in function main   SFMLTest   C:\Temp\SFMLTest\SFMLTest\Window.obj   1   
Error   LNK2019   unresolved external symbol "__declspec(dllimport) public: __cdecl sf::RenderWindow::RenderWindow(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (__imp_??0RenderWindow@sf@@QEAA@VVideoMode@1@AEBVString@1@IAEBUContextSettings@1@@Z) referenced in function main   SFMLTest   C:\Temp\SFMLTest\SFMLTest\Window.obj   1   
Error   LNK2019   unresolved external symbol "__declspec(dllimport) public: virtual __cdecl sf::RenderWindow::~RenderWindow(void)" (__imp_??1RenderWindow@sf@@UEAA@XZ) referenced in function main   SFMLTest   C:\Temp\SFMLTest\SFMLTest\Window.obj   1   

I included my vcxproj. I'm linking to the debug version of the lib files, and I'm compiling for debug x64. I'm not sure what I'm doing wrong. Do I need to compile new lib files? If so, do I download source to compile from github?

I really appreciate your help. I tried to look through the forum and tutorials as much as possible. I'm sorry to bother you with such a simple problem.

Thanks,
Anna

Pages: [1]
anything