natinusala / borealis

Hardware accelerated, controller and TV oriented UI library for PC and Nintendo Switch (libnx)
Apache License 2.0
255 stars 81 forks source link

Can't compile #161

Closed iUltimateLP closed 3 years ago

iUltimateLP commented 3 years ago

Hey there! This project looks great, but unfortunately, I can't seem to compile the demo application on my Windows 10 machine. I have set the Switch homebrew dev environment up and it works, since I'm also maintaining a homebrew app, but somehow I can't compile this.

Here's an excerpt of the compile errors I get, mostly it can't find the symbols defined in libnx. Any idea why?

G:/SwitchHomebrew/borealis/library/lib/platforms/switch/switch_input.cpp:53:5: error: 'padInitializeDefault' was not declared in this scope; did you mean 'socketInitializeDefault'?
   53 |     padInitializeDefault(&this->padState);
      |     ^~~~~~~~~~~~~~~~~~~~
      |     socketInitializeDefault
G:/SwitchHomebrew/borealis/library/lib/platforms/switch/switch_input.cpp: In member function 'virtual void brls::SwitchInputManager::updateControllerState(brls::ControllerState*)':
G:/SwitchHomebrew/borealis/library/lib/platforms/switch/switch_input.cpp:58:22: error: 'class brls::SwitchInputManager' has no member named 'padState'
   58 |     padUpdate(&this->padState);
      |                      ^~~~~~~~
G:/SwitchHomebrew/borealis/library/lib/platforms/switch/switch_input.cpp:58:5: error: 'padUpdate' was not declared in this scope; did you mean 'audrvUpdate'?
   58 |     padUpdate(&this->padState);
      |     ^~~~~~~~~
      |     audrvUpdate
G:/SwitchHomebrew/borealis/library/lib/platforms/switch/switch_input.cpp:59:46: error: 'class brls::SwitchInputManager' has no member named 'padState'
   59 |     uint64_t keysDown = padGetButtons(&this->padState);
      |                                              ^~~~~~~~
G:/SwitchHomebrew/borealis/library/lib/platforms/switch/switch_input.cpp:59:25: error: 'padGetButtons' was not declared in this scope
   59 |     uint64_t keysDown = padGetButtonscc1plus.exe:(&this->padState);
      |
unrecognized command line option '-Wno-volatile'
At global scope:
cc1plus.exe: warning: unrecognized command line option '-Wno-volatile'
make[1]: *** [/opt/devkitpro/devkitA64/base_rules:14: switch_input.o] Error 1
make[1]: *** [/opt/devkitpro/devkitA64/base_rules:14: switch_platform.o] Error 1
G:/SwitchHomebrew/borealis/library/lib/platforms/switch/switch_video.cpp: In member function 'void brls::SwitchVideoContext::updateWindowSize()':
G:/SwitchHomebrew/borealis/library/lib/platforms/switch/switch_video.cpp:175:18: error: 'AppletOperationMode_Console' was not declared in this scope; did you mean 'AppletOperationMode_Docked'?
  175 |             case AppletOperationMode_Console:
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                  AppletOperationMode_Docked
At global scope:
cc1plus.exe: warning: unrecognized command line option '-Wno-volatile'
masagrator commented 3 years ago

Update libnx, because for sure you have older than 4.0.0

iUltimateLP commented 3 years ago

Worked, thanks!