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

Compilation errors when using Windows+mingw32 #2

Open
ytSong74 opened this issue Mar 31, 2021 · 2 comments
Open

Compilation errors when using Windows+mingw32 #2

ytSong74 opened this issue Mar 31, 2021 · 2 comments

Comments

@ytSong74
Copy link
Member

Several issues have been found when I tried to compile the program on Windows.

  1. The usage of package Eigen3: The current configuration in the CMakeLists.txt only works for the Linux system.
    The CMakeLists file will be modified in the next commit. But it is required to define EIGEN3_INCLUDE_DIR as an environment variable on your Windows system. Also, it seems to be necessary to copy the FindEigen3.cmake file from the eigen library folder to ..\CMake\share\cmake-3.20\Modules folder.

  2. uint is not defined when complied with mingw32:
    Can be fixed by replacing uint with unsigned int.

  3. Will have fatal error: sys/resource.h: No such file or directory
    Possible solution: use Cygwin environment
    Related topic: https://stackoverflow.com/questions/18671090/compiling-c-with-ms-visual-c-2010-sys-resource-h-no-such-file

@FellegaraR
Copy link
Member

I created a new branch (called feature/windows_build) with a working build process on MSVC compiler..

Issue 1. I simplified the linking of Eigen3 library. please check that this is still working on linux and on windows systems with mingw32

Issue 3. sys/resource.h is posix so it is not compatible on windows unless using cygwin. I added a check that disable the memory peak feature on non-posix systems. In such systems we have to implement a new function for computing this statistic.

@ZacharyRabin
Copy link

I used windows subsystem for linux which helped issues 1 and 3.

Issue 1. using wsl, running sudo apt install libeigen3-dev and adding eigen3/ to the front of include headers that use the Eigen library seems to fix this issue for me

Issue 3. running the cython setup command in the linux environment through wsl also allowed me to bypass the sys/resource.h file not found error

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