david-cortes / approxcdf

(Python, R, C) Fast approximations for the CDF of multivariate normal distributions
http://approxcdf.readthedocs.io
BSD 3-Clause "New" or "Revised" License
18 stars 5 forks source link

Missing source file #3

Closed tamasso-parec closed 6 months ago

tamasso-parec commented 6 months ago

I was trying to build the code and run c_example.cpp within a personal project. When running make I received the following message:

/usr/bin/ld: packages/approxcdf/libapproxcdf.so: undefined reference to `norm_logcdf_2d'
/usr/bin/ld: packages/approxcdf/libapproxcdf.so: undefined reference to `norm_logcdf_3d'

Going back to the source file containing the definition of these functions, I found them in src/bhat_lowdim.cpp, which was not included in the SRC_FILES provided to the library. I fixed the issue by adding it to the list:

set(SRC_FILES ${PROJECT_SOURCE_DIR}/src/tvbs.cpp
              ${PROJECT_SOURCE_DIR}/src/drezner.cpp
              ${PROJECT_SOURCE_DIR}/src/genz.cpp
              ${PROJECT_SOURCE_DIR}/src/plackett.cpp
              ${PROJECT_SOURCE_DIR}/src/bhat.cpp
              ${PROJECT_SOURCE_DIR}/src/bhat_lowdim.cpp
              ${PROJECT_SOURCE_DIR}/src/gge.cpp
              ${PROJECT_SOURCE_DIR}/src/other.cpp
              ${PROJECT_SOURCE_DIR}/src/stdnorm.cpp
              ${PROJECT_SOURCE_DIR}/src/preprocess_rho.cpp
              ${PROJECT_SOURCE_DIR}/src/ldl.cpp
              ${PROJECT_SOURCE_DIR}/src/c_wrapper.cpp)
david-cortes commented 6 months ago

Thanks, added it to the list of source files.