Hi all, I'm new here
I followed the installation guide. Initially, I got a bunch of errors when trying to build the test code at the end of the guide, and I thought I finally had my linking sorted, but I left with only three errors.
I installed Visual Studio 2017 (specifically to have a compatible version of SFML).
I downloaded and extracted SFML-2.5.1-windows-vc15-64-bit
I followed the "SFML and Visual Studio" guide on the SFML website.
The guide says I "you must select "Win32 application"." VS 2017 doesn't list that as an option, so I picked Visual C++ > Empty Project.
I put the SFML include directory in the C++ Additional Include Directories, and the SFML lib directory in the Linker Additional Libray Directories. I also added C:\\SFML\lib\sfml-window-d.lib; C:\\SFML\lib\sfml-graphics-d.lib; to Linker > Input > Additional Dependencies
I also added sfml-window-d-2.dll and sfml-gfraphic-d-2.dll to the output directory.
Here is the code I compiled (straight off the installation guide):
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
sf::CircleShape shape(100.f);
shape.setFillColor(sf::Color::Green);
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.draw(shape);
window.display();
}
return 0;
}
And here are the build report:
1>------ Build started: Project: Tut1, Configuration: Debug x64 ------
1>Source.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl sf::String::String(char const *,class std::locale const &)" (__imp_??0String@sf@@QEAA@PEBDAEBVlocale@std@@@Z) referenced in function main
1>Source.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl sf::String::~String(void)" (__imp_??1String@sf@@QEAA@XZ) referenced in function main
1>C:\Users\garli\source\repos\Tut1\x64\Debug\Tut1.exe : fatal error LNK1120: 2 unresolved externals
1>Done building project "Tut1.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Hoping someone can help me out with this,
Thank you!