Skip to content
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

Build Errors against v0.6 tag #8

Closed
manderc3 opened this issue Mar 4, 2024 · 0 comments
Closed

Build Errors against v0.6 tag #8

manderc3 opened this issue Mar 4, 2024 · 0 comments

Comments

@manderc3
Copy link

manderc3 commented Mar 4, 2024

Hi, I've been following the progress of this project for the past few months now and I've only just attempted to carry out a build! The following following errors were encountered.

CDReader

[ 48%] Building CXX object CMakeFiles/clownmdemu-frontend.dir/cd-reader.cpp.o
In file included from /home/manderc3/stuff/code/clownmdemu-frontend/cd-reader.cpp:1:
/home/manderc3/stuff/code/clownmdemu-frontend/cd-reader.h:23:14: error: extra qualification ‘CDReader::’ on member ‘Close’ [-fpermissive]
   23 |         void CDReader::Close() { stream = nullptr; }
      |              ^~~~~~~~
/home/manderc3/stuff/code/clownmdemu-frontend/cd-reader.h:24:14: error: extra qualification ‘CDReader::’ on member ‘IsOpen’ [-fpermissive]
   24 |         bool CDReader::IsOpen() const { return stream.get() != nullptr; }
      |              ^~~~~~~~
/home/manderc3/stuff/code/clownmdemu-frontend/cd-reader.h:25:14: error: extra qualification ‘CDReader::’ on member ‘SeekToSector’ [-fpermissive]
   25 |         void CDReader::SeekToSector(cc_u32f sector_index);
      |              ^~~~~~~~
/home/manderc3/stuff/code/clownmdemu-frontend/cd-reader.h:26:16: error: extra qualification ‘CDReader::’ on member ‘ReadSector’ [-fpermissive]
   26 |         Sector CDReader::ReadSector();
      |                ^~~~~~~~
make[2]: *** [CMakeFiles/clownmdemu-frontend.dir/build.make:118: CMakeFiles/clownmdemu-frontend.dir/cd-reader.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:126: CMakeFiles/clownmdemu-frontend.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

Removing CDReader:: from the declaration of the affected member functions gets me past the errors.

SDL_HINT_WINDOWS_DPI_SCALING

[ 68%] Building CXX object CMakeFiles/clownmdemu-frontend.dir/frontend.cpp.o
/home/manderc3/stuff/code/clownmdemu-frontend/frontend.cpp: In function ‘bool Frontend::Initialise(int, char**, const FrameRateCallback&)’:
/home/manderc3/stuff/code/clownmdemu-frontend/frontend.cpp:998:21: error: ‘SDL_HINT_WINDOWS_DPI_SCALING’ was not declared in this scope
  998 |         SDL_SetHint(SDL_HINT_WINDOWS_DPI_SCALING, "1");
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/clownmdemu-frontend.dir/build.make:286: CMakeFiles/clownmdemu-frontend.dir/frontend.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:126: CMakeFiles/clownmdemu-frontend.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

SDL_HINT_WINDOWS_DPI_SCALING is a Windows specific hint, any reference to it should be wrapped within a suitable preprocessor guard.

Happy to submit a pull request to address the above issues. :)

Environment Details

  • Commit: b45d72c (tag v0.6)
  • OS: Ubuntu 22.04
  • Arch: x86-64
  • CMake Version: 3.26
  • Compiler: gcc/g++ 11.4.0

Build steps

Checkout Reposistory

git clone https://github.com/Clownacy/clownmdemu-frontend

Recursive Init of Submodules

git submodule update --init --recursive

Build

mkdir build
cd build
cmake ..
make
Clownacy added a commit that referenced this issue Mar 5, 2024
Also fixed the busted declarations that are described in #8.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant