Failed to Open File While Debugging Sample¶
Problem¶
Debugging Zivid code sample outputs the following message:
Error
Failed to load frame from file: Zivid3D.zdf
Possible cause¶
Some samples we provide depend on input files, such as the Zivid3D.zdf. When you configure the samples with CMake we copy these files. They are copied to the same folder as the executable will be generated.
When you use Visual Studio to debug the sample, please note that Visual Studio will by default execute from the ${ProjectDir}
.
Thus, the sample won’t find the input files, which it expects to find in ${TargetDir}
.