I am learning c++ and i would like to try to make a 2d game and I heard that for c++ opengl is the best option .I have Visual Studio 2013 and i am not sure how to set up opengl with it . There aren't many tutorials online and i am just not sure which opengl files i need and how to link them . Thank you
I personally prefer to use SFML as the window manager and have it set up the OpenGL context for me. Aside from doing that, it also offers input, window events, and audio functionality which OpenGL does not provide on its own.
Note: The arc synthesis tutorial is worth reading regardless -- it is hands down the best OpenGL tutorial I've ever seen. Don't trust any site that has you using glBegin/glEnd.
I have followed the instructions on the website on how to link everything and tried to run some SFML code to see if it works . In the debugger i got these errors:
Error 17 error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup c:\Users\Family\documents\visual studio 2013\Projects\Win32Project2\Win32Project2\MSVCRTD.lib(crtexew.obj) Win32Project2
Error 6 error LNK2019: unresolved external symbol "public: void __thiscall sf::Window::display(void)" (?display@Window@sf@@QAEXXZ) referenced in function _main c:\Users\Family\documents\visual studio 2013\Projects\Win32Project2\Win32Project2\Source.obj Win32Project2
Error 3 error LNK2019: unresolved external symbol "public: void __thiscall sf::Window::close(void)" (?close@Window@sf@@QAEXXZ) referenced in function _main c:\Users\Family\documents\visual studio 2013\Projects\Win32Project2\Win32Project2\Source.obj Win32Project2
Error 13 error LNK2019: unresolved external symbol "public: void __thiscall sf::Shape::setFillColor(class sf::Color const &)" (?setFillColor@Shape@sf@@QAEXABVColor@2@@Z) referenced in function _main c:\Users\Family\documents\visual studio 2013\Projects\Win32Project2\Win32Project2\Source.obj Win32Project2
Error 9 error LNK2019: 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) referenced in function _main c:\Users\Family\documents\visual studio 2013\Projects\Win32Project2\Win32Project2\Source.obj Win32Project2
Error 8 error LNK2019: unresolved external symbol "public: void __thiscall sf::RenderTarget::clear(class sf::Color const &)" (?clear@RenderTarget@sf@@QAEXABVColor@2@@Z) referenced in function _main c:\Users\Family\documents\visual studio 2013\Projects\Win32Project2\Win32Project2\Source.obj Win32Project2
Error 12 error LNK2019: unresolved external symbol "public: virtual __thiscall sf::Shape::~Shape(void)" (??1Shape@sf@@UAE@XZ) referenced in function "public: virtual __thiscall sf::CircleShape::~CircleShape(void)" (??1CircleShape@sf@@UAE@XZ) c:\Users\Family\documents\visual studio 2013\Projects\Win32Project2\Win32Project2\Source.obj Win32Project2
Error 11 error LNK2019: unresolved external symbol "public: virtual __thiscall sf::RenderWindow::~RenderWindow(void)" (??1RenderWindow@sf@@UAE@XZ) referenced in function _main c:\Users\Family\documents\visual studio 2013\Projects\Win32Project2\Win32Project2\Source.obj Win32Project2
Error 5 error LNK2019: unresolved external symbol "public: bool __thiscall sf::Window::pollEvent(class sf::Event &)" (?pollEvent@Window@sf@@QAE_NAAVEvent@2@@Z) referenced in function _main c:\Users\Family\documents\visual studio 2013\Projects\Win32Project2\Win32Project2\Source.obj Win32Project2
Error 4 error LNK2019: unresolved external symbol "public: bool __thiscall sf::Window::isOpen(void)const " (?isOpen@Window@sf@@QBE_NXZ) referenced in function _main c:\Users\Family\documents\visual studio 2013\Projects\Win32Project2\Win32Project2\Source.obj Win32Project2
Error 2 error LNK2019: unresolved external symbol "public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (??0VideoMode@sf@@QAE@III@Z) referenced in function _main c:\Users\Family\documents\visual studio 2013\Projects\Win32Project2\Win32Project2\Source.obj Win32Project2
Error 1 error LNK2019: unresolved external symbol "public: __thiscall sf::String::String(char const *,class std::locale const &)" (??0String@sf@@QAE@PBDABVlocale@std@@@Z) referenced in function _main c:\Users\Family\documents\visual studio 2013\Projects\Win32Project2\Win32Project2\Source.obj Win32Project2
Error 10 error LNK2019: 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) referenced in function _main c:\Users\Family\documents\visual studio 2013\Projects\Win32Project2\Win32Project2\Source.obj Win32Project2
Error 7 error LNK2019: unresolved external symbol "public: __thiscall sf::Color::Color(unsigned char,unsigned char,unsigned char,unsigned char)" (??0Color@sf@@QAE@EEEE@Z) referenced in function _main c:\Users\Family\documents\visual studio 2013\Projects\Win32Project2\Win32Project2\Source.obj Win32Project2
Error 14 error LNK2019: unresolved external symbol "public: __thiscall sf::CircleShape::CircleShape(float,unsigned int)" (??0CircleShape@sf@@QAE@MI@Z) referenced in function _main c:\Users\Family\documents\visual studio 2013\Projects\Win32Project2\Win32Project2\Source.obj Win32Project2
Error 16 error LNK2001: unresolved external symbol "public: static class sf::RenderStates const sf::RenderStates::Default" (?Default@RenderStates@sf@@2V12@B) c:\Users\Family\documents\visual studio 2013\Projects\Win32Project2\Win32Project2\Source.obj Win32Project2
Error 15 error LNK2001: unresolved external symbol "public: static class sf::Color const sf::Color::Green" (?Green@Color@sf@@2V12@B) c:\Users\Family\documents\visual studio 2013\Projects\Win32Project2\Win32Project2\Source.obj Win32Project2
Error 18 error LNK1120: 17 unresolved externals c:\users\family\documents\visual studio 2013\Projects\Win32Project2\Debug\Win32Project2.exe Win32Project2