Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hello-World xcopy error #11171

Closed
KirkPen opened this issue Dec 5, 2022 · 15 comments
Closed

Hello-World xcopy error #11171

KirkPen opened this issue Dec 5, 2022 · 15 comments

Comments

@KirkPen
Copy link

KirkPen commented Dec 5, 2022

| Camera Model | {D435i} |
| Firmware Version | (Open RealSense Viewer --> Click info) |
| Operating System & Version | Win (10)
| Kernel Version (Linux Only) | |
| Platform | PC
| SDK Version | 2.51.1.4348 |
| Language | C++ |
| Segment | {Robot |

Issue Description

Trying to build, debug in vs2022 the xcopy tries to copy from a path that does not exsist.

Error MSB3073 The command "xcopy /y "C:\Program Files\Intel RealSense SDK 2.0\bin\x64\realsense2.dll" "C:\Program Files (x86)\Intel RealSense SDK 2.0\samples\x64\Debug"
:VCEnd" exited with code 4. hello-realsense C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets 159

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Dec 6, 2022

Hi @KirkPen Windows has two program directories, 'Program Files' and 'Program Files (x86)' The RealSense SDK 2.0 installs to Program Files (x86) on a Windows computer. The realsense2.dll file is located in the Program Files (x86) directory, whereas the xcopy command above looks for it in the Program Files folder where it would not be located.

C:\Program Files (x86)\Intel RealSense SDK 2.0\bin\x64\realsense2.dll

@KirkPen
Copy link
Author

KirkPen commented Dec 6, 2022

Why does it look for it there? That is what needs to be fixed. That is why I made this ticket for you.

@MartyG-RealSense
Copy link
Collaborator

I will highlight this issue to my Intel RealSense colleagues. Thanks very much for your patience!

@RealSenseCustomerSupport
Copy link
Collaborator


Please check the path in the project property page -> Build-Events -> Post-Built event. If the path contains macro variable (i.e., librealsenseSDK), please check path of the variable as well. Thank you.

Attachment(s):
xcopy_path.png - https://realsensesupport.intel.com/attachments/token/fFd916WHKxhUIUnt36t04ylf2/?name=xcopy_path.png

@KirkPen
Copy link
Author

KirkPen commented Dec 8, 2022

Ya thats what I am trying to tell you, your macro is wrong, it is looking at c:\program files for the file to copy, and it should be looking at the c:\program filesx86. Please fix the macro as I can't edit it. My fix is to copy the files and end up with duplicates so the build will work.
image
image

@RealSenseCustomerSupport
Copy link
Collaborator


The librealsenseSDK path is based on the ProgramFiles path and it looks like VC2022 has changed the ProgramFiles directory from "Program Files (x86)" to "Program Files"

The macro is defined in the intel.realsense.prop file under Intel RealSense SDK2.0 folder.
Please open the file with elevated permission and change:
$(ProgramFiles)\Intel RealSense SDK 2.0
to
$(MSBuildProgramFiles32)\Intel RealSense SDK 2.0

After that, the project should be built correctly on vc2022.

Attachment(s):
vc2022_prgramfiles_path.jpg - https://realsensesupport.intel.com/attachments/token/QQcNK2TK35rZxuoTHP7yarzDt/?name=vc2022_prgramfiles_path.jpg

@KirkPen
Copy link
Author

KirkPen commented Dec 8, 2022

Thank you, that did it. I did spend some time trying to make the enviorment variable for programfiles (x86) to work but it did not like it.

@MartyG-RealSense
Copy link
Collaborator

@KirkPen It's great to hear that you had success!

@RealSenseCustomerSupport Thanks so much for helping @KirkPen

@MartyG-RealSense
Copy link
Collaborator

Hi @KirkPen Do you require further assistance with this case, please? Thanks!

@KirkPen
Copy link
Author

KirkPen commented Dec 14, 2022 via email

@MartyG-RealSense
Copy link
Collaborator

I have passed your suggestion to update the intel.realsense.prop file to @RealSenseCustomerSupport - thanks again!

hsuys added a commit to hsuys/librealsense that referenced this issue Dec 14, 2022
Fix path issue with VS2022. Ref: IntelRealSense#11171
@MartyG-RealSense
Copy link
Collaborator

A proposal has been submitted to the RealSense developer team to provide compatibility with VS2022 in a future SDK release, as described at hsuys@51e41b9

@MartyG-RealSense
Copy link
Collaborator

Update: the change has been merged into the RealSense SDK so that it will be in the next SDK release, as described at #11217

@MartyG-RealSense
Copy link
Collaborator

Case closed due to the proposed change having been merged into the RealSense SDK to be available in an upcoming release.

@KirkPen
Copy link
Author

KirkPen commented Dec 28, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants