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

[Request] binary or tutorial for Linux #21

Open
the-hotmann opened this issue Apr 2, 2023 · 4 comments
Open

[Request] binary or tutorial for Linux #21

the-hotmann opened this issue Apr 2, 2023 · 4 comments

Comments

@the-hotmann
Copy link

the-hotmann commented Apr 2, 2023

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!

@bitcookies
Copy link
Owner

Sorry, there may be no plans to port Linux for now, but there may be some solutions.

  1. 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.

  2. You can also use cmake, which is a bit complicated to do correctly.

I have time to try to compile under Linux as well. 🤔

@Sonic-The-Hedgehog-LNK1123

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.

@the-hotmann
Copy link
Author

@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? ;)

@Sonic-The-Hedgehog-LNK1123

@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.

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