- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm trying to replace align.cpp and align.h with align.cu and align.cuh, respectively for using CUDA. I have not made any change in their source codes -- just the name of files. I could activate the CUDA option on CMake. When building realsense2.dll on Visual Studio 2015, however, it gives me errors such as the following ones:
C2039 'HostingClass': "global namespace" is not a member .
C2433 'librealsense:HostingClass': 'friend' cannot be use to declare data.
The problem seem either that the align.cu and align.cuh are not compiled correctly or that these files are not linked to other C++ files correctly. Can anyone guess what changes I need to make?
Regards,
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The potential for errors when changing filenames is very high, as you have to make sure that absolutely every reference to the previous filename is changed. I have found in Visual Studio that mass-changing filenames automatically using Find and Replace All can cause a big mess in the code. It works better if you just Find In File so that a list of all the references appears in a list at the bottom of the Visual Studio window, and then click on and edit each reference in the list individually.
In regard to general advice when using SDK 2.0 with ARM: It may help if you are using the most recent version of SDK 2.0 (currently 2.12.0). A few versions back in version 2.11.0, a bug-fix for compiling on ARM was added.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks MartyG. Following your advice, I used File in Files but the change in file names was not an issue -- I still got the same set of errors. Thanks anyway.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I wonder if Visual Studio's project linkages were broken by changing the filenames. You could perhaps link to the new filenames I gave someone some advice on this recently.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
MartyG
Thanks. I just changed the file name from align.cpp to alignM.cpp as well as from aligh.h to alignM.h. After changing # include "align.h" to # include "alignM.h" in align.cpp and rs.cpp, I succeeded in building the SDK on Visual Studio. So, the issue I mentioned earlier seems to come from other factors.
I asked a similar question on a CUDA forum and will see if anyone gives me some advice.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page