-
Notifications
You must be signed in to change notification settings - Fork 912
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TEST_Animate2D.cpp does not compile on ubuntu #365
Comments
The Geometry util has undergone some major reworks and because of that it has broken this example. You can fix it by doing two things:
#include "utilities/olcUTIL_Animate2D.h"
#include "olcPixelGameEngine.h"
Should be good to go after that. |
It compiled! And it ran but it immediately got a segfault
Hey that's still progress |
This is because you have to supply your own image to load (it tries to load |
As to sprites and spritesheets, I'm new to them. I don't want to get too much down that rabbit hole because I'm more interested in the math and algorithms vs the game design but they're on my radar now as a thing to consider. I plugged in a static creative commons licensed mario png and it works, albiet probably not as expected. It doesn't crash. It shards the thing during animation in a kind of cool way. Anyway I opened a PR for these fixes. Feel free to update with a better spritesheet or make changes!!! |
In addition to the above I needed to add
into
in file (using "g++ (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0" under Ubuntu 22.04 LTS) |
Regarding the Unfortunately, the header provided in the PGE repo doesn't match. |
we require C++20, you're compiling with C++17 |
Compilation followed the Wiki under "https://github.com/OneLoneCoder/olcPixelGameEngine/wiki/Compiling-on-Linux#building":
See also the latest version of "https://github.com/OneLoneCoder/olcPixelGameEngine/blob/master/olcPixelGameEngine.h#L73":
Where is the "C++20" coming from? Maybe you are referring to another branch? |
Good to point that out. That's just for PGE itself, the extensions and utilities might have differing requirements. The wiki doesn't reflect that..... yet |
Great codebase and fun project. I am pretty new to this and to C++ generally
As the subject says, the TEST_ANIMATE2D does not work. If you could point me in the right direction of a fix, I can maybe do a PR - if the fix is simple.
The other example files compile no problem, with the following command
g++ -o test_quickGUI examples/TEST_QuickGUI.cpp -I. -lX11 -lGL -lpthread -lpng -lstdc++fs -std=c++17
When I do
g++ -o test_quickGUI examples/TEST_Animate2D.cpp -I. -lX11 -lGL -lpthread -lpng -lstdc++fs -std=c++17
I get the following list of errors:The text was updated successfully, but these errors were encountered: