vendredi 18 avril 2014

Capture Webcam C++ VS 2012 - bibliothèque erreur: « Impossible de démarrer le programme » - débordement de pile


Trying to capture video from my webcam device using Visual Studio 2012 with C++. My goal is to be able to view live feed from a USB camera for some ROV projects. I found a website (http://www.codeproject.com/Articles/559437/Capturing-video-from-web-camera-on-Windows-and) that has a Visual Studio solution. However, when I compile, I get an error that reads: "Unable to start program. VideoInputVS2012\videoInput\Debug\videoInput.lib". I tried including the library in the solution, but it didn't seem to work. Any suggestions?




What type of project are you building? If it is a static library you will not be able to run it. You may want to check your Project settings for the output target type.




-----------------------Updated Edit--------------------------------------------------




The codeproject code you downloaded has a project that generaters a static .lib file. You will need to create a another project that references this .lib file in order to use it.


There are actually two downloads that show the .lib class being used.



  1. TestVideoInputVS2012x86.zip - uses the OpenCV framework for presenting live video

  2. The second example is based on the SimpleCapture example from the Windows SDK (this code -SimpleCaptureVS2012x86.zip, application - SimpleCaptureVS2012x86-exe.zip).


Here is also an example provided of how to call the videoInput.lib static class:
For using this library it is enough to include videoInput.h and videoInput .lib in your project. This class is made as a singleton which makes managing of resources easy.


//TestvideoInput.cpp
#include "stdafx.h"
#include "videoInput.h"


#pragma comment(lib,"videoInput.lib")

...

The codeproject being referenced and discussed was created by Evgeny Pereguda



Trying to capture video from my webcam device using Visual Studio 2012 with C++. My goal is to be able to view live feed from a USB camera for some ROV projects. I found a website (http://www.codeproject.com/Articles/559437/Capturing-video-from-web-camera-on-Windows-and) that has a Visual Studio solution. However, when I compile, I get an error that reads: "Unable to start program. VideoInputVS2012\videoInput\Debug\videoInput.lib". I tried including the library in the solution, but it didn't seem to work. Any suggestions?



What type of project are you building? If it is a static library you will not be able to run it. You may want to check your Project settings for the output target type.




-----------------------Updated Edit--------------------------------------------------




The codeproject code you downloaded has a project that generaters a static .lib file. You will need to create a another project that references this .lib file in order to use it.


There are actually two downloads that show the .lib class being used.



  1. TestVideoInputVS2012x86.zip - uses the OpenCV framework for presenting live video

  2. The second example is based on the SimpleCapture example from the Windows SDK (this code -SimpleCaptureVS2012x86.zip, application - SimpleCaptureVS2012x86-exe.zip).


Here is also an example provided of how to call the videoInput.lib static class:
For using this library it is enough to include videoInput.h and videoInput .lib in your project. This class is made as a singleton which makes managing of resources easy.


//TestvideoInput.cpp
#include "stdafx.h"
#include "videoInput.h"


#pragma comment(lib,"videoInput.lib")

...

The codeproject being referenced and discussed was created by Evgeny Pereguda


0 commentaires:

Enregistrer un commentaire