david-cortes / isotree

(Python, R, C/C++) Isolation Forest and variations such as SCiForest and EIF, with some additions (outlier detection + similarity + NA imputation)
https://isotree.readthedocs.io
BSD 2-Clause "Simplified" License
186 stars 38 forks source link

Problems building isottree library on Windows using Visual Studio 2022 and CMake #62

Closed EagleDad closed 2 months ago

EagleDad commented 3 months ago

Hi dev team,

I'm trying to build the latest version of the isotree library on Window using Visual Studio and CMake.

Windows 10 Visual Studio 2022 - latest CMake 3.25.1

The project is created using CMake GUI without any changes. The flag recommended in the ReadMe is set.

While building the library I run into an issue of redefinition of input and output operator.

image

Is there something special to be done when using Windows as target system?

Thanks for your support.

david-cortes commented 3 months ago

Thanks for the bug report. I am however not seeing any such error when compiling in windows 10, neither with msvc2022, nor with mingw64.

Are you perhaps using this project as a submodule of something larger and including headers twice?

EagleDad commented 2 months ago

Hi David,

thanks for the quick reply. Building master works fine for me too, but building version 0.6.0 fails with the message above.

image

I also tried to build the project stand alone and it does not work. In the other project I try to use it with CMakes External Project. But since I cannot build it stand alone I do not think that this is the issue. The issue with the redefinitions is fixed in master.

My steps are: git clone https://github.com/david-cortes/isotree.git git checkout v0.6 Open CMake Gui Configure project without any chnages Open project in Visual Studio Try building the project

Since you do not have tags what do you recommend to use? The master or a branch specifying a version?

Thanks for support, Dirk

david-cortes commented 2 months ago

Please use the latest master branch only. There are no versioned relases for the C/C++ library.