How to build Open3D to be able to wrap the DLL for a .NET project?
- Dominant language
- C++
- Stars
- 14k
- Forks
- 2.6k
- Avg merge
- 5d 18h
- Merged PRs (30d)
- 6
Description
### Checklist
- [X] I have searched for [similar issues](https://github.com/isl-org/Open3D/issues).
- [ ] For Python issues, I have tested with the [latest development wheel](https://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](https://www.open3d.org/docs/release/) and the [latest documentation](https://www.open3d.org/docs/latest/) (for `main` branch).
### My Question
I'm trying to compile Open3D to get a DLL which I can use in C++ project which exports methods that I can use in a .NET C# project via P/Invoke.
I have tried hints from #2889 and #5608, or whatever I could find on StackOverflow. Information is sparse.
I managed to build a DLL that I can use in a C++ console application that I created in Visual Studio but not in a project that is compiled to a DLL containing `__declspec(dllexport)`.
As soon as I include Open3D.h my build fails with errors from various Open3D header files. I only have .NET/C# background so I don't know why it's even trying to build these files.
I'm only using the Windows runtime and I have tried to compile `main` and `0.18.0`. The `0.18.0` build fails and/or the `INSTALL` target doesn't work as expected.
Do you have any information on this?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the approaches referenced in issues #2889 and #5608, then inspect the Windows build configuration and the failing 0.18.0 INSTALL target. Done would be a documented, reproducible build path for producing a DLL usable from a C# project via P/Invoke, including the relevant Windows runtime steps.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, csharp
- Domain
- build-system, desktop
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100