I'm using ESPCAPI - https://github.com/jarikomppa/escapi to capture my webcam, but when I run the program it seems like either there is an initialisation error or it fails to find the devices.
I'm using MSVC 2017, but from what I have read is that all you need to do is include the escapi.cpp file into the project directory and that will take care of it for you but again as I said the if statement gets executed
anybody ever work with escapi have similar issues?
all you need to do is include the escapi.cpp file into the project directory and that will take care of it for you
this seems unlikely. You probably NEED to add the .cpp file to the project, though I could have missed something. Maybe everything in the folder is pulled in now?
but it ran, so clearly it found *something*.
I would try to debug it and step into setupESCAPI to see what is going on. Or read the docs on that function, to see what can cause it to return 0.
I stepped into the setupESCAPI() function in my program, and the it seems as it is returning NULL therefore returning, probably meaning it can't find the dll.
1 2 3 4
HMODULE capdll = LoadLibraryA("escapi.dll");
if (capdll == NULL)
return 0;
the escapi.dll is placed in the same folder as the project, I'm not sure if this is a relative path? also I tried adding the full path but the same result :/
Print the working directory of your program by doing system("cd");.
Place whatever file is needed to be loaded in that folder. Then relative paths should work.