ValleyBell / vgmplay-libvgm

a new VGMPlay, based on libvgm
74 stars 10 forks source link

Cannot build due to errors in PlayFile() #14

Closed SteelT1 closed 9 months ago

SteelT1 commented 9 months ago
/home/steel/Git/vgmplay-libvgm/playctrl.cpp: In function ‘UINT8 PlayFile()’:
/home/steel/Git/vgmplay-libvgm/playctrl.cpp:691:57: error: ‘PLAYTIME_LOOP_INCL’ was not declared in this scope
  691 |                                 const UINT8 timeFlags = PLAYTIME_LOOP_INCL | PLAYTIME_TIME_PBK;
      |                                                         ^~~~~~~~~~~~~~~~~~
/home/steel/Git/vgmplay-libvgm/playctrl.cpp:691:78: error: ‘PLAYTIME_TIME_PBK’ was not declared in this scope
  691 |                                 const UINT8 timeFlags = PLAYTIME_LOOP_INCL | PLAYTIME_TIME_PBK;
      |                                                                              ^~~~~~~~~~~~~~~~~
/home/steel/Git/vgmplay-libvgm/playctrl.cpp: In function ‘UINT8 HandleCtrlEvent(UINT8, INT32)’:
/home/steel/Git/vgmplay-libvgm/playctrl.cpp:861:54: error: ‘PLAYTIME_TIME_PBK’ was not declared in this scope
  861 |                         if ((genOpts.timeDispStyle & PLAYTIME_TIME_PBK) == PLAYTIME_TIME_FILE)
      |                                                      ^~~~~~~~~~~~~~~~~
/home/steel/Git/vgmplay-libvgm/playctrl.cpp:861:76: error: ‘PLAYTIME_TIME_FILE’ was not declared in this scope
  861 |                         if ((genOpts.timeDispStyle & PLAYTIME_TIME_PBK) == PLAYTIME_TIME_FILE)
      |                                                                            ^~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/vgmplay.dir/build.make:146: CMakeFiles/vgmplay.dir/playctrl.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/vgmplay.dir/all] Error 2
make: *** [Makefile:136: all] Error 2LAYTIME_TIME_FILE)
      |                                                                            ^~~~~~~~~~~~~~~~~~
ValleyBell commented 9 months ago

Please make sure that the libvgm submodule is up-to-date.

SteelT1 commented 9 months ago

It's already up to date, as this is a fresh clone of this project.

git submodule status
4e618f77d4bae216865c5abd972d99b1ba5031e2 ../libs/inih (r57-4-g4e618f7)
e8531ed21b44f5a723c1dd700701b2a58ce3ea01 ../libs/wingetopt (v1.00-4-ge8531ed)
223b6f9d629feda1982dc4bbeebd19fa63b987fb ../libvgm (heads/master)
ValleyBell commented 9 months ago

I don't get what's wrong.

Do you maybe have another libvgm installation in your system that CMake happens to pick up by accident?


Reason:
vgmplay-libvgm currently uses CMake's global package index to find libvgm.
The submodule is mainly to help picking the right commit due to regular API changes and I didn't yet implement a way to use libvgm as a subdirectory/prefer that version. (That is planned someday, but I haven't gotten around to do it yet.)

SteelT1 commented 9 months ago

I apparently did, and updating that install worked resolved the issue. Sorry for the bother.

ValleyBell commented 9 months ago

TBH this is at least partly a fault of how libvgm is used by VGMPlay.

I will restructure it in such a way that you can just use a "local" libvgm repo instead of the system-wide one. But... probably not very soon.