XorTroll / Plutonium

An easy-to-use UI framework for Nintendo Switch homebrew
https://xortroll.github.io/Plutonium/
MIT License
272 stars 40 forks source link

Cant Compile Examples #62

Closed korakoe closed 4 months ago

korakoe commented 2 years ago

Everytime i try to compile i get a bunch of errors, everything is set up exactly how the repo says it should be, the Makefile is identical, but I keep getting these errors

Main.cpp In file included from C:/Users/---/Documents/GitHub/Repono-Mod-Manger/Plutonium/include/pu/element.hpp:19, from C:/Users/---/Documents/GitHub/Repono-Mod-Manger/Plutonium/include/pu/Layout.hpp:15, from C:/Users/---/Documents/GitHub/Repono-Mod-Manger/Plutonium/include/pu/Application.hpp:18, from C:/Users/---/Documents/GitHub/Repono-Mod-Manger/Plutonium/include/pu/Plutonium:15, from C:/Users/---/Documents/GitHub/Repono-Mod-Manger/include/MainApplication.hpp:5, from C:/Users/---/Documents/GitHub/Repono-Mod-Manger/source/Main.cpp:1: C:/Users/---/Documents/GitHub/Repono-Mod-Manger/Plutonium/include/pu/element/Menu.hpp:30:71: error: 'KEY_A' was not declared in this scope 30 | void AddOnClick(std::function<void()> Callback, u64 Key = KEY_A); | ^~~~~ C:/Users/---/Documents/GitHub/Repono-Mod-Manger/include/MainApplication.hpp:8:33: error: 'pu::ui' has not been declared 8 | class CustomLayout : public pu::ui::Layout { | ^~ C:/Users/---/Documents/GitHub/Repono-Mod-Manger/include/MainApplication.hpp:8:37: error: expected '{' before 'Layout' 8 | class CustomLayout : public pu::ui::Layout { | ^~~~~~ C:/Users/---/Documents/GitHub/Repono-Mod-Manger/include/MainApplication.hpp:9:5: error: expected primary-expression before 'private' 9 | private: | ^~~~~~~ C:/Users/---/Documents/GitHub/Repono-Mod-Manger/include/MainApplication.hpp:9:5: error: expected '}' before 'private' C:/Users/---/Documents/GitHub/Repono-Mod-Manger/include/MainApplication.hpp:8:44: note: to match this '{' 8 | class CustomLayout : public pu::ui::Layout { | ^ C:/Users/---/Documents/GitHub/Repono-Mod-Manger/include/MainApplication.hpp:15:5: error: expected unqualified-id before 'public' 15 | public: | ^~~~~~ C:/Users/---/Documents/GitHub/Repono-Mod-Manger/include/MainApplication.hpp:21:1: error: expected constructor, destructor, or type conversion before '}' toke n 21 | }; | ^ C:/Users/grayb/Documents/GitHub/Repono-Mod-Manger/include/MainApplication.hpp:21:1: error: expected declaration before '}' token C:/Users/---/Documents/GitHub/Repono-Mod-Manger/include/MainApplication.hpp:24:36: error: 'pu::ui' has not been declared 24 | class MainApplication : public pu::ui::Application { | ^~ C:/Users/---/Documents/GitHub/Repono-Mod-Manger/include/MainApplication.hpp:24:40: error: expected '{' before 'Application' 24 | class MainApplication : public pu::ui::Application { | ^~~~~~~~~~~ C:/Users/---/Documents/GitHub/Repono-Mod-Manger/include/MainApplication.hpp:25:5: error: expected primary-expression before 'private' 25 | private: | ^~~~~~~ C:/Users/---/Documents/GitHub/Repono-Mod-Manger/include/MainApplication.hpp:25:5: error: expected '}' before 'private' C:/Users/---/Documents/GitHub/Repono-Mod-Manger/include/MainApplication.hpp:24:52: note: to match this '{' 24 | class MainApplication : public pu::ui::Application { | ^ C:/Users/---/Documents/GitHub/Repono-Mod-Manger/include/MainApplication.hpp:30:5: error: expected unqualified-id before 'public' 30 | public: | ^~~~~~ C:/Users/---/Documents/GitHub/Repono-Mod-Manger/include/MainApplication.hpp:35:9: error: expected constructor, destructor, or type conversion before 'void' 35 | void OnLoad() override; | ^~~~ C:/Users/---/Documents/GitHub/Repono-Mod-Manger/include/MainApplication.hpp:36:1: error: expected declaration before '}' token 36 | }; | ^ C:/Users/---/Documents/GitHub/Repono-Mod-Manger/source/Main.cpp: In function 'int main()': C:/Users/---/Documents/GitHub/Repono-Mod-Manger/source/Main.cpp:18:30: error: 'pu::ui' has not been declared 18 | auto renderer_opts = pu::ui::render::RendererInitOptions(SDL_INIT_EVERYTHING, pu::ui::render::RendererHardwareFlags); | ^~ C:/Users/---/Documents/GitHub/Repono-Mod-Manger/source/Main.cpp:18:87: error: 'pu::ui' has not been declared 18 | auto renderer_opts = pu::ui::render::RendererInitOptions(SDL_INIT_EVERYTHING, pu::ui::render::RendererHardwareFlags); | ^~ C:/Users/---/Documents/GitHub/Repono-Mod-Manger/source/Main.cpp:19:32: error: 'pu::ui' has not been declared 19 | renderer_opts.UseImage(pu::ui::render::IMGAllFlags); | ^~ C:/Users/---/Documents/GitHub/Repono-Mod-Manger/source/Main.cpp:20:32: error: 'pu::ui' has not been declared 20 | renderer_opts.UseAudio(pu::ui::render::MixerAllFlags); | ^~ C:/Users/---/Documents/GitHub/Repono-Mod-Manger/source/Main.cpp:22:25: error: 'pu::ui' has not been declared 22 | auto renderer = pu::ui::render::Renderer::New(renderer_opts); | ^~ C:/Users/---/Documents/GitHub/Repono-Mod-Manger/source/Main.cpp:25:34: error: incomplete type 'MainApplication' used in nested name specifier 25 | auto main = MainApplication::New(renderer); | ^~~ make[1]: *** [/opt/devkitpro/devkitA64/base_rules:14: Main.o] Error 1 make: *** [Makefile:167: build] Error 2

AnotherPillow commented 1 year ago

Can't compile them either. The library is added to the example, latest devkitpro, on arch linux error

(EDIT: I solved my particular error)

LauraWebdev commented 1 year ago

@AnotherPillow could you provide the way how you fixed your issue?

XorTroll commented 1 year ago

Adjust the path to Plutonium in your Makefile correctly, if you copied the example to a different directory

AnotherPillow commented 1 year ago

I think it was just that, project is here if you want to check. https://github.com/AnotherPillow/Iridium/blob/main/include/MainApplication.hpp