shocker-0x15 / OptiX_Utility

OptiX 8 Lightweight Wrapper Library
Other
98 stars 8 forks source link

Compiling on Linux #15

Open ib00 opened 1 year ago

ib00 commented 1 year ago

You probably don't support Linux (gcc/clang). Here are some errors (related to std library) while compiling with gcc 12.1:

optix_util.h(423): error: namespace "std" has no member "tuple_element_t" optix_util.h(471): error: namespace "std" has no member "tuple_element_t" optix_util.h(491): error: namespace "std" has no member "tuple_element_t" optix_util.h(601): error: namespace "std" has no member "index_sequence" optix_util.h(614): error: namespace "std" has no member "index_sequence" optix_util.h(621): error: namespace "std" has no member "index_sequence"

These can be fixed by including 'utility' header.

Other errors: cuda_util.cpp:374:18: error: ‘memcpy’ is not a member of ‘std’ cuda_util.cpp:254:22: error: ‘memset’ is not a member of ‘std’ cuda_util.cpp:46:9: error: ‘va_end’ was not declared in this scope cuda_util.cpp:45:9: error: ‘vprintf_s’ was not declared in this scope

optix_util_private.h:43:10: fatal error: intrin.h: No such file or directory

common.h:67:32: error: ambiguating new declaration of ‘void printf(const char*, ...)’

shocker-0x15 commented 1 year ago

I will possibly support Linux once OptiX supports to run on WSL. I guess the amount of required fixes to use OptiX_Utility on Linux is not so much (at least they should be non-essential parts). Well, OptiX_Utility uses some of template meta programming, I'm not sure those can be properly compiled with other environments than MSVC.

ib00 commented 1 year ago

I'll see if I can fix the compile errors. It has to do mainly with std library headers. If I get it to work, I'll let you know.

Metaprogramming shouldn't be the problem.

soraxas commented 1 year ago

+1 would be great if this library works in linux!