How to compile latest version on windows 10
-
- Posts: 2
- Joined: Fri 24 Dec, 2021 6:20 am
How to compile latest version on windows 10
HI all, Unsure as to how to compile this latest version or what environment needs to be set up, instructions are included for Linux & BSD but for nothing else.
I used to use in a mingw32 environment and pacman to get the prerequisites.
$ autoreconf -i
$ ./configure --enable-networking --enable-release-build
$ mingw32-make -j4
How should it be done now?
I used to use in a mingw32 environment and pacman to get the prerequisites.
$ autoreconf -i
$ ./configure --enable-networking --enable-release-build
$ mingw32-make -j4
How should it be done now?
Re: How to compile latest version on windows 10
See Here. Also see my additional notes.
For networking, you'll need to add mingw-w64-{i686,x86_64}-libpcap to the list of packages to install.
To build with the ninja backend (MSYS2 recommendation), you will need mingw-w64-{i686,x86_64}-ninja, and add -DMSYS=TRUE to the cmake command line. Eg:
For networking, you'll need to add mingw-w64-{i686,x86_64}-libpcap to the list of packages to install.
To build with the ninja backend (MSYS2 recommendation), you will need mingw-w64-{i686,x86_64}-ninja, and add -DMSYS=TRUE to the cmake command line. Eg:
Code: Select all
cmake -G Ninja -DMSYS=TRUE -DUSE_NETWORKING=ON -DCMAKE_BUILD_TYPE=Release ..
- ruben_balea
- Posts: 191
- Joined: Mon 08 May, 2017 11:24 pm
- Location: Spain
Re: How to compile latest version on windows 10
Thank you very much for the guide, I was quite lost trying to find the correct commands...
The only downside after compiling PCem is running it just to find how it complains about a lot of missing libraries so I have written all the necessary ones for a release build with networking in a single command, one for MinGW 32 and another for for MinGW 64, I guess those will be the same for everybody, if not or if there's a better way to do that please correct me.
After make (or ninja) finishes building pcem paste one of the following commands to copy the required DLL files to the same directory as pcem.exe
Use this command under MSYS2 MinGW 32:
Use this command under MSYS2 MinGW 64:
To paste text in the MSYS2 console you can press Shift+Insert or right click on the window and select paste from the menu, then press Enter to run the pasted command.
The only downside after compiling PCem is running it just to find how it complains about a lot of missing libraries so I have written all the necessary ones for a release build with networking in a single command, one for MinGW 32 and another for for MinGW 64, I guess those will be the same for everybody, if not or if there's a better way to do that please correct me.
After make (or ninja) finishes building pcem paste one of the following commands to copy the required DLL files to the same directory as pcem.exe
Use this command under MSYS2 MinGW 32:
Code: Select all
cd output && cd bin && cp /mingw32/bin/libLerc.dll ./ && cp /mingw32/bin/libdeflate.dll ./ && cp /mingw32/bin/libexpat-1.dll ./ && cp /mingw32/bin/libgcc_s_dw2-1.dll ./ && cp /mingw32/bin/libjbig-0.dll ./ && cp /mingw32/bin/libjpeg-8.dll ./ && cp /mingw32/bin/liblzma-5.dll ./ && cp /mingw32/bin/libopenal-1.dll ./ && cp /mingw32/bin/libpng16-16.dll ./ && cp /mingw32/bin/libstdc++-6.dll ./ && cp /mingw32/bin/libtiff-5.dll ./ && cp /mingw32/bin/libwebp-7.dll ./ && cp /mingw32/bin/libwinpthread-1.dll ./ && cp /mingw32/bin/libzstd.dll ./ && cp /mingw32/bin/sdl2.dll ./ && cp /mingw32/bin/wxbase30u_gcc_custom.dll ./ && cp /mingw32/bin/wxbase30u_xml_gcc_custom.dll ./ && cp /mingw32/bin/wxmsw30u_adv_gcc_custom.dll ./ && cp /mingw32/bin/wxmsw30u_core_gcc_custom.dll ./ && cp /mingw32/bin/wxmsw30u_html_gcc_custom.dll ./ && cp /mingw32/bin/wxmsw30u_xrc_gcc_custom.dll ./ && cp /mingw32/bin/zlib1.dll ./ && cd .. && cd ..
Code: Select all
cd output && cd bin && cp /mingw64/bin/libLerc.dll ./ && cp /mingw64/bin/libdeflate.dll ./ && cp /mingw64/bin/libexpat-1.dll ./ && cp /mingw64/bin/libgcc_s_seh-1.dll ./&& cp /mingw64/bin/libjbig-0.dll ./ && cp /mingw64/bin/libjpeg-8.dll ./ && cp /mingw64/bin/liblzma-5.dll ./ && cp /mingw64/bin/libopenal-1.dll ./ && cp /mingw64/bin/libpng16-16.dll ./ && cp /mingw64/bin/libstdc++-6.dll ./ && cp /mingw64/bin/libtiff-5.dll ./ && cp /mingw64/bin/libwebp-7.dll ./ && cp /mingw64/bin/libwinpthread-1.dll ./ && cp /mingw64/bin/libzstd.dll ./ && cp /mingw64/bin/sdl2.dll ./ && cp /mingw64/bin/wxbase30u_gcc_custom.dll ./ && cp /mingw64/bin/wxbase30u_xml_gcc_custom.dll ./ && cp /mingw64/bin/wxmsw30u_adv_gcc_custom.dll ./ && cp /mingw64/bin/wxmsw30u_core_gcc_custom.dll ./ && cp /mingw64/bin/wxmsw30u_html_gcc_custom.dll ./ && cp /mingw64/bin/wxmsw30u_xrc_gcc_custom.dll ./ && cp /mingw64/bin/zlib1.dll ./ && cd .. && cd ..
- MichaelJManley
- Posts: 54
- Joined: Fri 17 Dec, 2021 9:42 pm
Re: How to compile latest version on windows 10
I am going to add the dll list to the article. Being that Linux is my primary os I tend to forget about Windows nuances! Lol.ruben_balea wrote: ↑Sun 26 Dec, 2021 8:20 pm The only downside after compiling PCem is running it just to find how it complains about a lot of missing libraries
Re: How to compile latest version on windows 10
Note, you can use ntldd to automate the DLL copying.
See here for how I've done it in dosbox-staging. This could be adapted for PCem.
See here for how I've done it in dosbox-staging. This could be adapted for PCem.
-
- Posts: 2
- Joined: Fri 24 Dec, 2021 6:20 am
Re: How to compile latest version on windows 10
Thanks so much for the guide worked like a charm
Re: How to compile latest version on windows 10
I just downloaded again the code from the repo.
My system was prepared from viewtopic.php?p=7078#p7078 and it worked.
checkout dev branch
cmake -G Ninja -DMSYS=TRUE -DUSE_NETWORKING=ON -DCMAKE_BUILD_TYPE=Release
returns immediately :/ no error message
Any suggestions?
My system was prepared from viewtopic.php?p=7078#p7078 and it worked.
checkout dev branch
cmake -G Ninja -DMSYS=TRUE -DUSE_NETWORKING=ON -DCMAKE_BUILD_TYPE=Release
returns immediately :/ no error message
Any suggestions?
- MichaelJManley
- Posts: 54
- Joined: Fri 17 Dec, 2021 9:42 pm
Re: How to compile latest version on windows 10
Install PCAP Dependencies (mingw-w64-{i686,x86_64}-libpcap) or do -DUSE_PCAP_NETWORKING=NO if you just want SLiRP supportedilson wrote: ↑Sun 02 Jan, 2022 11:29 pm I just downloaded again the code from the repo.
My system was prepared from viewtopic.php?p=7078#p7078 and it worked.
checkout dev branch
cmake -G Ninja -DMSYS=TRUE -DUSE_NETWORKING=ON -DCMAKE_BUILD_TYPE=Release
returns immediately :/ no error message
Any suggestions?
Re: How to compile latest version on windows 10
I reinstalled libpcap and it worked.
Thanks
Thanks
Re: How to compile latest version on windows 10
I had another problem, the wrong version of CMake was installed. I had to uninstall the other version and then reinstall the correct CMake to get everything to work.
If you get an error message about the system being unknown and that the C compiler can't compile a simple file you can try this:
If you get an error message about the system being unknown and that the C compiler can't compile a simple file you can try this:
Code: Select all
pacman -R cmake
pacman -S mingw-w64-{x86_64,i686}-cmake
Re: How to compile latest version on windows 10
Going through that MSYS2 guide (after 3.64gb of dev env prep) deadended me...
Code: Select all
$ cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release ..
CMake Error: Could not create named generator MSYS Makefiles
Generators
* Unix Makefiles = Generates standard UNIX makefiles.
Ninja = Generates build.ninja files.
Ninja Multi-Config = Generates build-<Config>.ninja files.
CodeBlocks - Ninja = Generates CodeBlocks project files.
CodeBlocks - Unix Makefiles = Generates CodeBlocks project files.
CodeLite - Ninja = Generates CodeLite project files.
CodeLite - Unix Makefiles = Generates CodeLite project files.
Eclipse CDT4 - Ninja = Generates Eclipse CDT 4.0 project files.
Eclipse CDT4 - Unix Makefiles= Generates Eclipse CDT 4.0 project files.
Kate - Ninja = Generates Kate project files.
Kate - Unix Makefiles = Generates Kate project files.
Sublime Text 2 - Ninja = Generates Sublime Text 2 project files.
Sublime Text 2 - Unix Makefiles
= Generates Sublime Text 2 project files.
- ruben_balea
- Posts: 191
- Joined: Mon 08 May, 2017 11:24 pm
- Location: Spain
Re: How to compile latest version on windows 10
That can happen if you run cmake from MSYS2 MSYS, if this was your case you have to switch to MSYS2 MinGW 32 or MSYS2 MinGW 64 to compile PCem, in some of the earlier guides it was specified but I think the last guide is missing that step
MSYS2: MSYS2 MINGW64: (Edit: I added screen captures)
MSYS2: MSYS2 MINGW64: (Edit: I added screen captures)
Re: How to compile latest version on windows 10
Alright it's built. I'm now seeing a pcem.exe and libpcem.dll. Thank!
- MichaelJManley
- Posts: 54
- Joined: Fri 17 Dec, 2021 9:42 pm
Re: How to compile latest version on windows 10
I will update the Windows one to be more accurate. Also I need to make one for Ubuntu and openSUSE