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

Windows build - Compilation error on snesreader moc files #351

Closed
Krokodyl opened this issue Apr 6, 2023 · 3 comments
Closed

Windows build - Compilation error on snesreader moc files #351

Krokodyl opened this issue Apr 6, 2023 · 3 comments

Comments

@Krokodyl
Copy link

Krokodyl commented Apr 6, 2023

Hello,

I get this error when I try to compile the current branch.

Compiling snes/chip/sa1/sa1.cpp...
Compiling snes/chip/necdsp/necdsp.cpp...
Compiling snes/chip/bsx/bsx.cpp...
Compiling snes/chip/srtc/srtc.cpp...
Compiling snes/chip/sdd1/sdd1.cpp...
Compiling snes/chip/spc7110/spc7110.cpp...
Compiling snes/chip/cx4/cx4.cpp...
Compiling snes/chip/obc1/obc1.cpp...
Compiling snes/chip/st0018/st0018.cpp...
Compiling snes/chip/msu1/msu1.cpp...
Compiling snes/chip/serial/serial.cpp...
Linking out/bsnes...
make[1]: Entering directory 'D:/emulation/git/bsnes-plus/snesreader'
../external/qt/mingw-w64/bin/moc -i filechooser.moc.hpp -o obj/filechooser.moc
make[1]: *** [Makefile:66: obj/filechooser.moc] Error -1073741515
make[1]: Leaving directory 'D:/emulation/git/bsnes-plus/snesreader'
make: *** [Makefile:134: plugins] Error 2
D:/emulation/git/bsnes-plus/bsnes $

I'm using Windows 10, w64devkit-1.18.0.
I cloned the repo with git bash, and activated the submodule with 'git submodule update --init --recursive'. I get the error when running mingw32-make.exe from w64devkit-1.18.0.
I also tried to run mingw32-make.exe from git bash (mingw64) but I can't even start the compilation (Qt5 files are not found despite the fact that the submodule folders are in the $PATH).
Should I just install Visual Studio and QT5 directly?

@devinacker
Copy link
Owner

It's strange that moc apparently works fine for bsnes itself but not for the plugins. If you run mingw32-make build (which skips building the optional plugins)` does bsnes itself build and link successfully?

I also tried to run mingw32-make.exe from git bash (mingw64) but I can't even start the compilation (Qt5 files are not found despite the fact that the submodule folders are in the $PATH).

Try passing platform=win to mingw32-make to force the build to use the prebuilt Windows Qt binaries. (I may need to fix platform detection for mingw64)

@Krokodyl
Copy link
Author

Krokodyl commented Apr 6, 2023

Both solutions worked!
I can build the exe now.
Thanks.

@dinkc64
Copy link

dinkc64 commented Apr 24, 2024

I wasted so much time trying to get this to build. fortunately the answer was in a closed issue :)

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

3 participants