Ask Your Question
1

Problem in instalation with vs2010 Windows 7 X64

asked 2012-07-08 17:52:54 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

Hello Guys! Sorry about my dumb question, but I tried to find in internet solution for my problem, but I have no sucess. I install the OpenCV 2.4.2 and when I will type my program thats ok. The problem is when I will compile, the windows show me the follow error:

"The application was unable to start correctly (0x0000013). Click OK to close the application."

I tried everthing, I dont know what to do.

Somebody can I help me?

Tks in advance.

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
0

answered 2012-07-09 01:47:07 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

It seems the version you use does not match. Try to compile OpenCV Library from source code by yourself on the same platform (Windows 7 + VS2010).

It really doesn't matter whether you use win32 or x64. But you have to match everything.

  • 32-bit Application (.exe) + 32-bit OpenCV library (.dll)
  • OR 64-bit Application (.exe) + 64-bit OpenCV library (.dll)
edit flag offensive delete link more
0

answered 2012-07-09 08:48:41 -0600

Reinaldow gravatar image

Thanks for answer, but I matched with the opencv x64 library.

C:\OpenCV\build\x64\vc10\lib

In debug mode, I put in 64bit version.

In Additional the dependencies I put this libs: c:\OpenCV\build\x64\vc10\lib\opencvcore242d.lib c:\OpenCV\build\x64\vc10\lib\opencvhighgui242d.lib c:\OpenCV\build\x64\vc10\lib\opencvvideo242d.lib c:\OpenCV\build\x64\vc10\lib\opencvml242d.lib c:\OpenCV\build\x64\vc10\lib\opencvlegacy242d.lib c:\OpenCV\build\x64\vc10\lib\opencvimgproc242d.lib

This is my code:

#include "stdafx.h"
#include <cv.h>
#include <cxcore.h>
#include <highgui.h>

 int _tmain(int argc, _TCHAR* argv[])
    {
      // Open the file.
       IplImage *img = cvLoadImage("photo.jpg");
       if (!img) {
            printf("Error: Couldn't open the image file.\n");
            return 1;
    }

    // Display the image.
    cvNamedWindow("Image:", CV_WINDOW_AUTOSIZE);
    cvShowImage("Image:", img);

    // Wait for the user to press a key in the GUI window.
    cvWaitKey(0);

    // Free the resources.
    cvDestroyWindow("Image:");
    cvReleaseImage(&img);

    return 0;

}

edit flag offensive delete link more

Comments

I can run your code without any problem. But I do not use static LIBs.

Niu ZhiHeng gravatar imageNiu ZhiHeng ( 2012-07-10 03:34:08 -0600 )edit
0

answered 2012-12-03 10:10:13 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

I have similar problem. Change platform to X64.

Check command line in linker and see whether /MACHINE:X64 is present.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-07-08 17:52:54 -0600

Seen: 1,002 times

Last updated: Dec 03 '12