Compile Emma 02 on Windows
These instructions describe how to compile Emma 02 on windows using Visual Studio 2008 or 2015. If you have any problems feel free to drop me an email.
Download and compile the libraries described in the following sub chapters.
Download the latest stable wxwidgets 3.x release from: www.wxwidgets.org.
Before compiling follow these steps:
- if you are using VS 2015 make the changes described on: msw_vc14_compiler_fixes
- Go to folder build\msw and make changes to all wx_vc9_x.vcproj files as described on:
I don't think the changes under 'Editing setup.h in the directory include/msvc/wx' are needed in 3.0.2 release.
Now open wx_vc9.sln in VS 2008 (for 2015 Visual Studio will do some file conversion). Select either the 'debug' or 'release' build, target machine (win32 or x64) and select 'build solution'.
Download the Visual C++ development library for SDL2 from: www.libsdl.org/
Copy the x64 SDL2.dll file to windows\system32
Copy the x86 SDL2.dll file to windows\SysWOW64
This sounds like the wrong way around but apparently this is the way to do it!
Download curl 7.x from: curl.haxx.se/download.html
Go to the folder projects/Windows/VC9 (or VC14 for VS 2015) open curl-all.sln and then build libcurl for 'LIB Debug - DLL Windows SSPI' and 'LIB Release - DLL Windows SSPI', if needed build both for Win32 and x64 targets.
I had some problem to compile this library on windows but succeeded (somewhat) in the end following the procedure below. Maybe there is a simpler way!
Download libserialport from: sigrok.org/wiki/Downloads
Install MSYS2 (use the 64bit installer, msys2-x86_64-*.exe).
For the windows 32 bit library use the 'MSYS2 MinGW 32-bit' shell, follow the chapter 'Native build using MSYS2' on https://sigrok.org/wiki/Windows#Windows_installers, make sure you follow the 'toolchain steps in the READ-ME file'. Store libserialport.a in $(SERIALPORT)\Win32\lib and libserialport.h in $(SERIALPORT)\Win32\include
For the windows 32 bit library use the 'MSYS2 MinGW 64-bit' shell, follow the chapter 'Native build using MSYS2' on https://sigrok.org/wiki/Windows#Windows_installers, make sure you follow the 'toolchain steps in the READ-ME file'. When executing make use make CFLAGS='-Wl,--output-def,libserialport.def' this will ensure that a .def file is created. Then create a .lib file with 'lib /def:libserialport.def /out:libserialport.lib'. Store the libserialport.lib in $(SERIALPORT)\Win64\lib and libserialport.h in $(SERIALPORT)\Win64\include.
Build Emma 02
Set the WXWIN, SDL, CURL and SERIALPORT variables to the folders used to compile above libraries in the same way as described for WXWIN on: Adding_an_Environment_Variable_under_Windows.
Pull the latest source package from github repository https://github.com/etxmato/emma_02
Now open the 'Emma 02 vc9.sln' (for VS 2008) or 'Emma 02 vc14.sln' (for VS 2015) file and build the desired Emma 02 package (X64 or x86, release or debug) find the generated 'Emma 02.exe'.
During any of the above compilation action you might get some warnings which should not cause any problems.