MSYS2 is optimized for Windows 32- and 64-Bit Version’s.
So, MSYS2 will run native in no SandBox or Virtual ByteCode.
It comes with a rich amount of DLL Files:
- beginning by the (Win)DOS libc
- crosses at Win32API
- and end with very much Framework Project DLL
(can be, that these Frameworks have to be installed seperatly
e.g.: Qt 5 - The Free Alternative for BORLAND Delphi VCL)
Other than Cygwin - which you can also use.
The only thing is, that the plain Console Application follows a internal structure of Directory-Layout.
So, MSys2 helps you, to port Linux ISO-C/C++ Projects to Windows - by using the Win32API.
Cygwin is optimized for X-Server Application’s, but has its own Directory-Layout.
So, if you run native MSYS2 Applications on Console, the Path-Layout is:
/HardDriveLetter/path/to/… e.g.: # cd /E/Projects/RocksDB
the last one change the Directory to HardDrive E:\Projects\RocksDB.
In Cygwin, you have to add a Prefix: # cd /cygdrive/E/…
Both Systems have cons, and pros.
To Compile RockDB on Windows 10 MinGW-64, you need the sources: Source Link
- download
- depack it on huge (disk space Drive)
- make sure, you have install g++, gcc, …
- go to the MSYS2 folder, and click the Mingw64.exe Application Icon in the Explorer
(a Shell Window should be open)
- change the Directory: e.g.: # cd /E/Projects/RocksDB
(make sure, you are in the Root-Folder
- create a new Directory called “build” with: # mkdir build
- navigate to build through: # cd build
- make sure, you have install CMAKE (maybe you need ninja, too)
- to start the Compile Process, type in: # cmake …
(important: two Points !)
This folder will then use for Compiler Output, so if you fail, you don’t need to re-install (zip file)
because cmake create a lot of temporary stuff
- after some seconds, you can see Output Text, take care there is no Warning or Error at last
step/last line.
- if no error, dont take care about “not found” stuff - the most Compiler things will work.
- now, type in ./build the following Command: # ninja
- press Enter/Return Key and don’t forget to make the Cafe working, from now on it will take
a while … if you have luck, there should be compiled about 707 no. of Files
… depend on your Computer Speed, and RAM
… I recommend 16 GB of RAM, 200 GB Hard Disk Space, 8 Core CPU (< 10 Minutes)
- if ninja Job ends, and no Warning or Error is displayed on the Screen, then you have
fresh new Installation Files (.dll, .a, and .exe Files for/and Test purposes)
If you plan to contribute/publish this Files, you need two .dll that comes from MinGW-64
or MSYS2. What the Name of this Files are, can you determine, if you remove the PATH
Environment Variable (I assume you are in a DOS-Shell like Command.com or cmd.com)
by type in:
1. E:\echo %PATH% rem: to store/output the old state of PATH for restore
2. E:\set PATH= rem: this clear the PATH Variable
Then navigate to your RocksDB Directory (E:\Projects\RocksDB), and try to start a .EXE File
In common way, you will be noticed by the Windows System, which .DLL is need to start the
Application.
But since this are Global .DLL Files, you can use it with other Software of your Desire.
Note:
Make sure, you use the same .DLL Files like you have compile the RocksDB File’s.
- So, you can not use 64-Bit .DLL in 32-Bit Application’s.
- But you can use 64-Bit Application’s with 32-Bit DLL Files.
An other Point of View is the Fact, that the Local (char set) is important.
The new Windows Versions at XP upwards, use UTF-8, UTF-16.
So, you can stuckle in Trouble about the Encoding’s of File Layout.
UTF-8 is a Mixture of ANSI + UTF-8 (ANSI: 0x20 … 0x1F) (UTF-8: 0x1f … 0xff)
UTF-16 is widely used. There, one Character consists of 2 Byte’s !
The Space Char. in UTF-16 is: 0x20 0x00
The the new line in UTF-16 is: 0x0A 0x00
…
Please let me know, when I have forget something.
Thank’s for reading
paule32