Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5983435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:13:50+00:00 2026-05-22T22:13:50+00:00

I could not start an OpenCV application under Windows. Given the following simple OpenCV

  • 0

I could not start an OpenCV application under Windows.

Given the following simple OpenCV program:

#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <fstream>

#include "cv.h"
#include "highgui.h"

char imagename[100] = "sudoku.jpg";

IplImage* img;

int main(int argc, char** argv) {
    cvInitSystem(argc, argv);

    cvNamedWindow("Example4", CV_WINDOW_AUTOSIZE);
    IplImage* img = cvLoadImage(imagename);

    cvShowImage("Example4", img);
    cvWaitKey(0);
    cvDestroyWindow("Example4");
    return (0);
}

I can compile and start using a precompiled OpenCV libraries version 2.2, the referenced image appears in a window. (The compilation did work using netbeans and cygwin or own makefile with 5 lines and minGW).
Then I wanted to use C++ function calls in OpenCV but the compilation did not work so based on this answer I have decided to recompile OpenCV following this installation guide and this getting started guide.

Using minGW and CMake OpenCV had been compiled without complaints. I did not use any optional package for opencv compilation.

Unfortunately no program could be started because only a grey window appears and after while the application crashes and the following error message is given by Windows:

Problem signature:
  Problem Event Name:   APPCRASH
  Application Name: main.exe
  Application Version:  0.0.0.0
  Application Timestamp:    4de3a2d9
  Fault Module Name:    libopencv_highgui220.dll
  Fault Module Version: 0.0.0.0
  Fault Module Timestamp:   4dcd07e6
  Exception Code:   c0000005
  Exception Offset: 0002def4
  OS Version:   6.1.7600.2.0.0.256.4
  Locale ID:    1033
  Additional Information 1: 0a9e
  Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
  Additional Information 3: 0a9e
  Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

What could be the problem?

I tried to compile from Netbeans, with my own Makefile and with Cmake-gui and the executives were created without problem. I have included the opencv bin dir in the PATH to make the mentioned libopencv_highgui220.dll visible.

Update:

Following the previous procedure I got the exact same result on a Windows XP Professional: opencv and project building is OK, but running hangs. There are no other C, C++, compilers and IDEs on this machine that may interfere with my opencv compilation.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T22:13:51+00:00Added an answer on May 22, 2026 at 10:13 pm

    I have posted the same question at opencv forum and I got an answer.

    The problem was that I used either the lib or the bin opencv directory for linking and the PATH. Using the install guide it turned out to me that I have to use the lib directory for the linking and bin directory for the PATH. The combined usage of dll.a in lib and dll in bin was new to me.

    So I have followed the CodeBlocks+MinGW guide step by step to solve the problem, moreover
    when I use my previous MinGW opencv built without CodeBlocks either the C or the C++ code run correctly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I could not find any pointers on how to create a menubar icon on
Just could not get this one and googling did not help much either.. First
I'm sorry I could not think of a better title. The problem is the
Here is some code I could not get to format properly in markdown, this
The exact error is as follows Could not load file or assembly 'Microsoft.SqlServer.Replication, Version=9.0.242.0,
After having a search around I could not find exactly what I want, I
OK so that title sucks a little but I could not think of anything
I googled a lot, and could not find a single open source implementation of
Sorry for the slightly rubbish title. I could not think how to describe this
Add service reference to Amazon service fails, saying Could not load file or assembly

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.