rpg_svo icon indicating copy to clipboard operation
rpg_svo copied to clipboard

Can't compile on windows.

Open antithing opened this issue 8 years ago • 1 comments

Hi, i am attempting to build this on windows 10, vs2015, and am getting many errors.

Error C3861 'posix_memalign': identifier not found svo \vikit_common\include\vikit\aligned_mem.h 67

Error C2244 'vk::NLLSSolver<D,T>::setPrior': unable to match function definition to an existing declaration \rpg_vikit-master\vikit_common\include\vikit\nlls_solver_impl.hpp 296

Am i missing something to get this to work on windows? Thanks!

antithing avatar Nov 25 '16 14:11 antithing

Solved, years later. :)

void* ptr = NULL;
int error = posix_memalign(&ptr, 16, 1024);
if (error != 0) {
  // OMG: it failed!, error is either EINVAL or ENOMEM, errno is indeterminate
}

on unix systems becomes:

void* ptr = _aligned_malloc(1024, 16);
if (!ptr) {
  // OMG: it failed! error is stored in errno.
}

on windows.

antithing avatar Jul 27 '17 21:07 antithing