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

Fix for OS other than Windows (Linux tested) & cmake #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

NicolasNOE
Copy link

The initial code would not compile on Linux, so a few change had to be done. Furthermore, even after initial changes to be able to compile, and extra fix had to be done to get correct results.

A CMakeLists.txt file for CMake has also been added to generate static or shared library on both Windows and Linux.

Tested on both Windows and Linux.

The code had to be fixed do compile on other OS than Windows. Some small
changes also had to be applied to have correct results on other OS.

- the '\' had to be replaced by '/' in #include, the latter being valid on
both Windows and Linux (and Mac, and ...) OS
- the "_copysign" function is "copysign" for non Windows OS
- the use of "abs" is code led to bad results (it would convert double
to integers instead of taking absolute values), it's been replace by
"fabs"
Tested on both Windows (Visual Studio projects) and Linux (makefiles for
gcc).

With the code fixes, the results are identifical on both OS.
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

Successfully merging this pull request may close these issues.

None yet

1 participant