C++ Graphics for easy understanding

Okay, so in my programming adventure, changing different languages, trying some new game makers or so, i'm stuck on this:
"Why when i try making something graphical with SFML or SDL2 i always get some annoying errors that are just too stupid and i don't even know why they are there or why everything is working different for me".Basically my Question is:
Can you tell me any good Graphics instead of: SFML, SDL/2, OPENGL, GLUT, GLEW(or any openGL)and Alegro. Well these people say are really good buuuuuut, they take too much time of technical understanding and the hours of searching tutorials are only people who can't explain, they take too much time in explaining useless stuff, they just say that they will explain something later in the tutorials and always make and type code soooo fast that you can't see what to type.
I might be getting too much into this but if you can, please tell me any graphics for C++ that are understandable and easy to use.

-Thanks in Advance :D


:D YES finally, i'done with this.So what actually made this question solved.
I was playing on Visual studio with SFML and while i was trying to fix my error for the unresolved external symbol i actually made it happen so i don't have this error anymore.
Last edited on
Have a look at WinBGI: https://github.com/Duthomhas/WinBGIm-fixed-sort-of-
Anyway does it have to be C++ ?
Graphic programming is much easier in Python, Java or .NET
Can you tell me any good Graphics instead of: SFML, SDL/2, OPENGL, GLUT, GLEW(or any openGL)and Alegro.

Not any good ones that you won't have to figure out how to install. SFML isn't too hard to build/install if you follow the site's tutorial, but I agree it can still confusing for anyone trying to do it for the first time. But learning how to build libraries is a very useful skill in C++. Otherwise, you'll waste years of your life trying to re-invent the wheel.

The "hello world" in SFML should work without any modification, and SFML is especially good in that it's written in C++ and has a very clean interface. I really do suggest trying to get it to work and re-reading the tutorials, but anyway...

I have not used Duthomhas' library fix. I'm sure it's great, but my understanding is that WinBGI is still a very old and crusty thing, and is not capable of what modern libraries can do; but for simple drawing or UI, I'm sure it's fine and easier to set up than a full-fledged library, so go ahead and try Thomas1965/Duthomhas' link until you get more used to C++/libraries.

(Also, personally, I found Python to be really slow for rendering HD images pixel-by-pixel, CPU-side, but that's probably not the typical use case when people talk about graphics libraries.)
Hi, why i am removing SFML from my wanted list for now, is that when i make just the window it gives me a lot of errors
Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#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 when i compile

Severity	Code	Description	Project	File	Line	Source	Suppression State
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: static class sf::RenderStates const sf::RenderStates::Default" (__imp_?Default@RenderStates@sf@@2V12@B)	Game001	C:\Users\Kids\source\repos\Game001\Game001\main.obj	1	Build	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: __thiscall sf::CircleShape::CircleShape(float,unsigned int)" (__imp_??0CircleShape@sf@@QAE@MI@Z)	Game001	C:\Users\Kids\source\repos\Game001\Game001\main.obj	1	Build	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::RenderWindow::~RenderWindow(void)" (__imp_??1RenderWindow@sf@@UAE@XZ)	Game001	C:\Users\Kids\source\repos\Game001\Game001\main.obj	1	Build	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: __thiscall sf::RenderWindow::RenderWindow(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (__imp_??0RenderWindow@sf@@QAE@VVideoMode@1@ABVString@1@IABUContextSettings@1@@Z)	Game001	C:\Users\Kids\source\repos\Game001\Game001\main.obj	1	Build	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Color::Color(unsigned char,unsigned char,unsigned char,unsigned char)" (__imp_??0Color@sf@@QAE@EEEE@Z)	Game001	C:\Users\Kids\source\repos\Game001\Game001\main.obj	1	Build	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::display(void)" (__imp_?display@Window@sf@@QAEXXZ)	Game001	C:\Users\Kids\source\repos\Game001\Game001\main.obj	1	Build	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Window::pollEvent(class sf::Event &)" (__imp_?pollEvent@Window@sf@@QAE_NAAVEvent@2@@Z)	Game001	C:\Users\Kids\source\repos\Game001\Game001\main.obj	1	Build	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Window::isOpen(void)const " (__imp_?isOpen@Window@sf@@QBE_NXZ)	Game001	C:\Users\Kids\source\repos\Game001\Game001\main.obj	1	Build	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::close(void)" (__imp_?close@Window@sf@@QAEXXZ)	Game001	C:\Users\Kids\source\repos\Game001\Game001\main.obj	1	Build	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: static class sf::Color const sf::Color::Green" (__imp_?Green@Color@sf@@2V12@B)	Game001	C:\Users\Kids\source\repos\Game001\Game001\main.obj	1	Build	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::RenderTarget::draw(class sf::Drawable const &,class sf::RenderStates const &)" (__imp_?draw@RenderTarget@sf@@QAEXABVDrawable@2@ABVRenderStates@2@@Z)	Game001	C:\Users\Kids\source\repos\Game001\Game001\main.obj	1	Build	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::RenderTarget::clear(class sf::Color const &)" (__imp_?clear@RenderTarget@sf@@QAEXABVColor@2@@Z)	Game001	C:\Users\Kids\source\repos\Game001\Game001\main.obj	1	Build	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Shape::setFillColor(class sf::Color const &)" (__imp_?setFillColor@Shape@sf@@QAEXABVColor@2@@Z)	Game001	C:\Users\Kids\source\repos\Game001\Game001\main.obj	1	Build	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: __thiscall sf::String::String(char const *,class std::locale const &)" (__imp_??0String@sf@@QAE@PBDABVlocale@std@@@Z)	Game001	C:\Users\Kids\source\repos\Game001\Game001\main.obj	1	Build	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (__imp_??0VideoMode@sf@@QAE@III@Z)	Game001	C:\Users\Kids\source\repos\Game001\Game001\main.obj	1	Build	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::CircleShape::~CircleShape(void)" (__imp_??1CircleShape@sf@@UAE@XZ)	Game001	C:\Users\Kids\source\repos\Game001\Game001\main.obj	1	Build	
Error	LNK2001	unresolved external symbol "__declspec(dllimport) public: __thiscall sf::String::~String(void)" (__imp_??1String@sf@@QAE@XZ)	Game001	C:\Users\Kids\source\repos\Game001\Game001\main.obj	1	Build	
Error	LNK1120	17 unresolved externals	Game001	C:\Users\Kids\source\repos\Game001\Release\Game001.exe	1	Build	



I really can't understand why, i do the same things in the tutorials, i write the same code i copy paste it and i get this annoying error every time.
These errors are linker errors. They mean that the linker can't find the implementation of the functions.
They are in an external libraries.
Have you added all the libraries to your project ?
Is that Visual Studio? If so are you reading this?
https://www.sfml-dev.org/tutorials/2.4/start-vc.php

The graphics module relies on the following libraries (the s is for static, I'm not sure how you're building dynamic or static).

sfml-window-s.lib
sfml-system-s.lib
opengl32.lib
freetype.lib
jpeg.lib
Topic archived. No new replies allowed.