bab2min / EigenRand

Fastest Random Distribution Generator for Eigen
https://bab2min.github.io/eigenrand/
MIT License
92 stars 13 forks source link

How to include the library #20

Closed NicoBrug closed 3 years ago

NicoBrug commented 3 years ago

Hello,

I may sound like a nooby but I'm going for it. How to include your library? I did not understand in your documentation you just say to download it and that's all but I guess there is not that to do. I already have Eigen. I am on Linux. Thanks!

bab2min commented 3 years ago

Hi @NicoBrug , sorry for the lack of documentation. First, download and unzip it. And provide the directory where you unzipped it with -I option to gcc like following.

$ wget https://github.com/bab2min/EigenRand/archive/refs/tags/v0.3.3.tar.gz
$ tar -zxvf v0.3.3.tar.gz  #it will generate the folder `EigenRand-0.3.3`
$ g++ -std=c++11 your_file.cpp -IEigenRand-0.3.3/
NicoBrug commented 3 years ago

Thanks for your answer, to use the library with cmake, you can include in the CMakeLists.txt: include_directories(lib/EigenRand-0.3.3) link_directories(lib/EigenRand-0.3.3)