niessner / mLib

Research Library used in the Visual Computing Lab
http://niessnerlab.org
MIT License
89 stars 45 forks source link

mLib compile error in VS2017 + CUDA 9.1 #5

Closed rayhero closed 6 years ago

rayhero commented 6 years ago

I want to use this lib to build the bundlefusion server using VS2017 + CUDA9.1. I meet a C2280 error: attempting to reference a deleted function in D3D11Canvas2D.h: the error happen in auto _e = e.castBillboard:

2018-02-01 10 33 09

I not sure this error is the IDE bug or the mLib bug?

dazinovic commented 6 years ago

Fixed by making _e a const reference. Make sure you also rebuild the libraries from mLibExternal if you are using a newer compiler.

psyduck04 commented 6 years ago

@dazinovic Hello, I meet C2280 error too, and I use mLib to build the bundlefusion project by VS2015 + CUDA9.1. Could you tell me how to rebuild the libraries from mLibExternal ? Thank you !

jackxujh commented 5 years ago

Hi @dazinovic, could you elaborate how do you make _e a const reference? I am not sure which line I should change. Meanwhile, how do I rebuild the libraries from mLibExternal?

Fixed by making _e a const reference. Make sure you also rebuild the libraries from mLibExternal if you are using a newer compiler.

dazinovic commented 5 years ago

_e is already a const reference in the code. You don't need to change anything there. For each library you want to link against, you will have to build it yourself. There is no general guide for this, it depends on the specific libraries.

jackxujh commented 5 years ago

Do you mean that mLib is not built when the code includes it in a Visual Studio project?

chethanab16 commented 3 years ago

@jackxujh did you solved this problem , could you suggest how to do it

Severity Code Description Project File Line Suppression State Error C2280 'ml::D3D11Canvas2D::ElementBillboard::ElementBillboard(const ml::D3D11Canvas2D::ElementBillboard &)': attempting to reference a deleted function FriedLiver d:\azure_kinect_bundlefusion\bundlefusion-master1_2017_retar\external\mlib\include\application-d3d11\d3d11canvas2d.h 302

chethanab16 commented 3 years ago

@dazinovic could you please explain me more about it I didn't understand "For each library you want to link against, you will have to build it yourself. There is no general guide for this, it depends on the specific libraries."

chethanab16 commented 3 years ago

@rayhero could you suggest me how to solve this problem , I have similar problem as yours bundle_fusion_2017_error_2

thank you

KernelA commented 3 years ago

I changed:

auto _e = e.castBillboard();

to

auto& _e = e.castBillboard();