Open lafith opened 2 years ago
Hi, Unfortunately, I do not have an idea what could be going wrong in your example. I would recommend starting with the simplest possible example (just printing something) and then adding complexity step by step to find the step causing the program to stop working.
Ok I tried this approach and this is when I am getting no output nor error. Do you have any idea where could be the problem?
#include <iostream>
#include <libuvc/libuvc.h>
int main(){
std::cout<<"UVC Test:"<<std::endl;
uvc_context_t *ctx = nullptr;
uvc_error_t res = uvc_init(&ctx, nullptr);
// if (res < 0)
// {
// uvc_perror(res, "uvc_init error");
// std::cout<<"error"<<std::endl;
// }
// uvc_exit(ctx);
// std::cout<<"Done!"<<std::endl;
return 0;
}
@lafith uvc_init
compares against NULL
, not nullptr
. I do not know enough about c++ to know if this makes a difference. Please give passing NULL
instead a try.
@papr No, same result :(
Hi, I built libuvc in windows without any error following your instructions. I wrote few lines just to check if it is working. It is running without any error but it is also not printing out anything.
main.cpp
CMakeLists.txt