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

Cannot build emulator #2209

Closed
CodaWear opened this issue Nov 23, 2024 · 3 comments
Closed

Cannot build emulator #2209

CodaWear opened this issue Nov 23, 2024 · 3 comments

Comments

@CodaWear
Copy link

Heres my output

FAILED: src/CMakeFiles/core.dir/ARMJIT_Memory.cpp.obj
C:\msys64\mingw64\bin\c++.exe -DARCHITECTURE_x86_64=1 -DGDBSTUB_ENABLED -DJIT_ENABLED -DMELONDS_GL_HEADER="frontend/glad/glad.h" -DNOMINMAX -DOGLRENDERER_ENABLED -DWIN32_LEAN_AND_MEAN -IC:/msys64/home/Coda/melonDS/build/src -IC:/msys64/home/Coda/melonDS/src/teakra/src/../include -O3 -DNDEBUG -std=gnu++17 -flto=auto -fno-fat-lto-objects -fwrapv -Wno-invalid-offsetof -MD -MT src/CMakeFiles/core.dir/ARMJIT_Memory.cpp.obj -MF src\CMakeFiles\core.dir\ARMJIT_Memory.cpp.obj.d -o src/CMakeFiles/core.dir/ARMJIT_Memory.cpp.obj -c C:/msys64/home/Coda/melonDS/src/ARMJIT_Memory.cpp
C:/msys64/home/Coda/melonDS/src/ARMJIT_Memory.cpp: In member function 'bool melonDS::ARMJIT_Memory::UnmapFromRange(melonDS::u32, melonDS::u32, melonDS::u32, melonDS::u32)':
C:/msys64/home/Coda/melonDS/src/ARMJIT_Memory.cpp:350:10: error: 'UnmapViewOfFileEx' was not declared in this scope; did you mean 'UnmapViewOfFile2'?
350 | if (!UnmapViewOfFileEx(dst, MEM_PRESERVE_PLACEHOLDER))
| ^~~~~~~~~~~~~~~~~
| UnmapViewOfFile2
C:/msys64/home/Coda/melonDS/src/ARMJIT_Memory.cpp: In destructor 'melonDS::ARMJIT_Memory::~ARMJIT_Memory()':
C:/msys64/home/Coda/melonDS/src/ARMJIT_Memory.cpp:944:33: error: 'UnmapViewOfFileEx' was not declared in this scope; did you mean 'UnmapViewOfFile2'?
944 | bool viewUnmapped = UnmapViewOfFileEx(MemoryBase, MEM_PRESERVE_PLACEHOLDER);
| ^~~~~~~~~~~~~~~~~
| UnmapViewOfFile2

@RSDuck
Copy link
Member

RSDuck commented Nov 23, 2024

are you using Windows 7?

@CodaWear
Copy link
Author

I'm on windows 11 should I use 7?

@RSDuck
Copy link
Member

RSDuck commented Nov 23, 2024

no, I noticed that this function seems to be introduced in Windows 8.

If you aren't already, try building via ucrt instead of mingw64 and try updating packages (pacman -Syu).

EDIT: I should probably dynamically load this function as well for compability, though if you are running Windows 11, you should not be affected by this at all.

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

2 participants