0

I'm trying to use the library ZBar to read QRCode with c++. I am not an expert about this language. I have the following problem:

#include <iostream>
#include <zbar.h>

using namespace std;
using namespace zbar;

int main()
{
    cout << "Hello World!" << endl;
    //Image image;
    return 0;
}

This code does actually print the "Hello World" as expected. But if I remove the comment, obtaining the following code:

#include <iostream>
#include <zbar.h>

using namespace std;
using namespace zbar;

int main()
{
    cout << "Hello World!" << endl;
    Image image;
    return 0;
}

Everything is still compiled correctly, with no errors or warnings, but I don't obtain any output!! The program reaches the end without executing any instruction! I just used this code to semplify, but the problem actually is that, as soon as I add an instruction using classes from zbar, it seems like I am "clearing" the main! How is it possible? What should I do? Thank you!

YSC
  • 38,212
  • 9
  • 96
  • 149
A23Random
  • 31
  • 1
  • what happens when you step through with a debugger – pm100 Jun 28 '17 at 16:02
  • Mmmh... ok, it looks like the problem was not executed at all. Using a debugger, I get the dialog "Executable Failed" with message "During startup program exited with code 0xc0000135. What does it mean? – A23Random Jun 28 '17 at 16:06
  • 0xC0000135 STATUS_DLL_NOT_FOUND – pm100 Jun 28 '17 at 16:11
  • if you are genuinely stuck (seems like you should ensure that the dll is in yr path) run yr app with procmon (sysinternals) runnin. You will be able to see where its looking. Also try depends http://www.dependencywalker.com/ – pm100 Jun 28 '17 at 16:20

0 Answers0