2

i searched stackoverflow and fixed the cannot find or open pdb files. Everybody keeps saying that these are just warnings. but the code doesnt run I tried everything i could find. I ran VS as administrator but it says

'hmd.exe': Loaded 'C:\WINDOWS\SysWOW64\ntdll.dll', Symbols loaded (source information stripped). 'hmd.exe': Loaded 'C:\WINDOWS\SysWOW64\kernel32.dll', Symbols loaded (source information stripped). 'hmd.exe': Loaded 'C:\WINDOWS\SysWOW64\KernelBase.dll', Symbols loaded (source information stripped).

The program '[6156] hmd.exe: Native' has exited with code -1073741701 (0xc000007b).

I know that symbols are loaded and i know that this question is asked several times but i didnt find any answers. i searched alot but these are the only errors that arise. and message window says exited with code (0xc000007b)

this is the code:

#include<iostream>
#include<opencv2/opencv.hpp>

using namespace std;

using namespace cv;

int main()
{
    //open and read the image
    Mat img = imread("C:\\Users\\Hammad\\Desktop\\as.jpg", CV_LOAD_IMAGE_COLOR);

    if (img.empty())
    {
        cout << "Image cannot be loaded..!!" << endl;
        return -1;
    }

    //change the color image to grayscale image
    cvtColor(img, img, CV_BGR2GRAY);

    //equalize the histogram
    Mat img_hist_equalized;
    equalizeHist(img, img_hist_equalized);

    //create windows
    namedWindow("Original Image", CV_WINDOW_AUTOSIZE);
    namedWindow("Histogram Equalized", CV_WINDOW_AUTOSIZE);

    //show the image
    imshow("Original Image", img);
    imshow("Histogram Equalized",img_hist_equalized);

    waitKey(0); //wait for key press

    destroyAllWindows(); //destroy all open windows
    return 0;
}
IInspectable
  • 46,945
  • 8
  • 85
  • 181

1 Answers1

1

The key is the error code returned from your application: 0xc000007b. This usually indicates a mismatch between 32 and 64 bit components. Open your application in Dependency Walker to find the modules that have mismatching bitness.

A more in-depth explanation of the error code can be found at this stackoverflow question.

A hacky 'solution' can be found at this blog entry.

Community
  • 1
  • 1
IInspectable
  • 46,945
  • 8
  • 85
  • 181
  • i tried ur way. i made sure there isnt any mismatch in 32 or 64 bit components. still no cure :( – user2857829 Oct 25 '13 at 17:31
  • If you loaded up your application in Dependency Walker it will show you which modules have mismatching bitness. If this truly is a broken image header then Dependency Walker will show that as well. – IInspectable Oct 25 '13 at 17:48
  • *"Doesn't work"* is not an error description. What have you tried? What was the expected result? What was the actual result? Don't be lazy, be specific. – IInspectable Oct 26 '13 at 19:36
  • well i tried every way to sure sure that the program ran.its just a simple code using opencv. the last thing i tried is dependency walker.i made sure that every configuration, environment variables, the linker and additional directories are proper. but this error doesnt vanish. – user2857829 Oct 26 '13 at 22:45