[Request] binary or tutorial for Linux
the-hotmann opened this issue · comments
I would really like to know, if this code is also intended to be used on Linux.
Of course I can use mono or wine . but I would like to run it as binary or a compiled code on linux.
So how do I compile this for linux? :)
Thanks in advance!
Sorry, there may be no plans to port Linux for now, but there may be some solutions.
-
Create a makefile that will compile everything for you. Copy these files and build a replacement
.vcxproj
for Linux's compilation tools. Google used to have a tool called Make It So that would do this automatically, but it has long been unsupported by the newer visual studio. -
You can also use cmake, which is a bit complicated to do correctly.
I have time to try to compile under Linux as well. 🤔
The current code will not compile under Linux since HasherSha1Traits.hpp
calls the Windows API to compute the SHA-1 of some data with no alternative implementation.
I've been messing with Linux support myself a while ago.
Here is a ZIP with new and modified files for Linux support. (unchanged files are not included in the zip file)
The code has a dependency on GMP, but most Linux distro's should have that.
@Sonic-The-Hedgehog-LNK1123 thank you so much! I think this should be implemented into the repo!
It worked, although it does not support the newest std=c++
versions. But that is ok.
The only problem I have right now is (maybe even offtopic!)
I can not get it to work smoothly with golangs CGO. At the end I always get the error:
/usr/include/c++/10/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options
Thanks!
P.S.: maybe you have some expirience with this and can help out? ;)
@MartinHotmann I only ever tested this code with a online compiler service that ends up running user code in a Linux environment. (I also compiled it using MinGw (GCC), but that was on Windows, not Linux)
It worked, although it does not support the newest std=c++ versions. But that is ok.
That is very strange, since this code requires C++17 support, what error are you getting there?
I can not get it to work smoothly with golangs CGO. At the end I always get the error:
/usr/include/c++/10/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options
This error is telling you it detected C++11 code while running in C++0x mode, Again this code actually requires C++17 support.