Exception at videoMan.getAvailableDevice()

  • Hello,

    I can run the executable opencvSimple.exe that is included in the package. It works properly with my webcam.
    I set up a project with opencvSimple.cpp in Visual C++ Express Edition and it did compile.
    In Release mode, the execution stops with an unhandled exception at line
                videoMan.getAvailableDevices( "DSHOW_CAPTURE_DEVICE", list ); //list all the available devices

    In Debug mode, the console displays "There is no available camera" and the execution stops a little further. Just in case you wondered, there was a connected USB webcam.

    Do you have any idea what could go wrong?

    Thanks in advance,


  • Hello,

    I could fix my own problem:
    I managed to recompile VideoMan.dll and VMDirectShow.dll. When I replaced the old dll by the recompiled dll files in the directory of the executable, it worked normally.


  • Nice, thanks for the feedback. Are you using the code from the SVN?

  • I downloaded the code from SourceForge.
    Are there some major updates in the SVN?

  • yes, there are a lot of important updates in the SVN. Specially those incompatibilities between different Visual Studio versions have been resolved

  • shacharm

    Im getting the same problem
    the other problem is, that I cant seem to understand whats wrong with my trials of compling using CMake (using the GUI)
    I've input the source location (tried both \control or \control\inputs, since i wasnt sure) and it has failed
    Need some help, if possible.. im stuck :)

  • In Cmake the source dir must be the SVN downloaded folder

  • Hello Azkuene,

    First of all, thanks for replying to requests. It is appreciated!

    I installed TortoiseSVN and checked out the files.
    I started CMake and entered
        Where is the source code: C:/Program Files/VideoMan
        Where to build the binaries: C:/Program Files/VideoMan/bin

    When I press "Configure", I obtain the followin outputs:

    CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
    Please set them or make sure they are set and tested correctly in the CMake files:
       used as include directory in directory C:/Program Files/VideoMan/examples/VMwithDirectShow
       used as include directory in directory C:/Program Files/VideoMan/examples/VMwithDirectShowMultiVideo
       used as include directory in directory C:/Program Files/VideoMan/examples/multiCamera
       used as include directory in directory C:/Program Files/VideoMan/examples/videoFileControl
       used as include directory in directory C:/Program Files/VideoMan/examples/drawing2D
       used as include directory in directory C:/Program Files/VideoMan/examples/opencvSimple
       used as include directory in directory C:/Program Files/VideoMan/examples/opencvLKdemo
        linked by target "exampleVMwithDirectShow" in directory C:/Program Files/VideoMan/examples/VMwithDirectShow
        linked by target "exampleVMwithDirectShowMultiVideo" in directory C:/Program Files/VideoMan/examples/VMwithDirectShowMultiVideo
        linked by target "exampleMultiCamera" in directory C:/Program Files/VideoMan/examples/multiCamera
        linked by target "exampleVideoFileControl" in directory C:/Program Files/VideoMan/examples/videoFileControl
        linked by target "exampleDrawing2D" in directory C:/Program Files/VideoMan/examples/drawing2D
        linked by target "exampleOpencvSimple" in directory C:/Program Files/VideoMan/examples/opencvSimple
        linked by target "exampleOpencvLKdemo" in directory C:/Program Files/VideoMan/examples/opencvLKdemo

    Configuring incomplete, errors occurred!

    I first thought it was related to the environment variables. I manually added the environment variable GLUT_INCLUDE_DIR to be C:\Program Files\glut-3.7.6-bin (i.e. where glut.h is located). It didn't help.

  • Hi, you can configure the glut paths in the cmake gui, glut.h must be inside of a directory called GL. Create that directory in your glut path "C:\Program Files\glut-3.7.6-bin\GL" and place there the glut.h. Then use that path or "C:\Program Files\glut-3.7.6-bin\" (i'm not sure) in cmake.
    Best regards

  • Once again, I found a way out!
    For those who might have encountered the same problem, here is what I did.

    1. In my previous message, 'Where to build the binaries" doesn't have to include "/bin". It is generated automatically. So you can enter something like "C:/Program Files/VideoMan"

    2. In CMake, switch from "Simple View" to "Advanced View". That will enable the display of a long list of variables (columns "Name" and "Value")

    3. In the column "Name", search for "GLUT_INCLUDE_DIR". In the column "Value", if there is something like "GLUT_INCLUDE_DIR - NOTFOUND", replace it by the directory where is located the file glut.h (*). In my case, it was "C:/Program Files/glut-3.7.6-bin"

    4. In the column "Name", search for "GLUT_glut_LIBRARY". In the column "Value", if not properly set, set it to the filepath to glut32.lib. In my case, it was "C:/Program Files/glut-3.7.6-bin/glut32.lib"

    You should now be able to configure and generate.

    When I compiled the generated solution, I had to replace the #include <GL/glut.h> by #include <glut.h> in a few files as there was no "GL" subdirectory in my root GLUT directory. I also had to manually add the include directories for streams.h, strmbase.h and atlbase.h

    I hope it can help save some time!

    (*) if glut.h is in a subdirectory called "GL", do not include the "/GL". It might be easier for you to compile as the source files have #include <GL/glut.h>

  • Hello Azkuene,

    I just saw you added a reply, probably while I was working on the case.
    It seems that the cause of my problem was the absence of the subdirectory "GL" in my GLUT root directory, so your proposal to create one and move the content in that GL subdirectory would probably be easier!

    Thank you!

  • Thanks for the explanation