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 8086357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:25:16+00:00 2026-06-05T18:25:16+00:00

I wrote a simple test program for opencv to see if it’s working after

  • 0

I wrote a simple test program for opencv to see if it’s working after I compiled my OpenCV 2.4 in visual studio 2010 pro.

The program goes like this:

#include "StdAfx.h"    
#include <opencv2/highgui/highgui.hpp>
#include <iostream>

using namespace cv;
using namespace std;

int main()
{
    Mat im = imread("c:/full/path/to/lena.jpg");
    if (im.empty()) 
    {
        cout << "Cannot load image!" << endl;
        return -1;
    }
    imshow("Image", im);
    waitKey(0);
}

The thing is that the program compiles without problems ( I’ve set all the lib paths and include paths in visual studio), but when I try to run it, it gives me the following error message winow:
“The program can’t start because opencv_core240d.dll is missing from your computer. Try reinstalling the program to fix this problem”

Now, I’ve read that this could be solved by setting the windows PATH variable to the directory where the actual .dll file is located by doing a cmd command:

SET PATH="C:\Program Files (x86)\OpenCV\opencv\build\bin\Debug"

The path specified is indeed the path where the .dll file is located however, I still get the error.

Help would really be appreciated since I’ve spent far too much time cocking around this…

  • 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-06-05T18:25:17+00:00Added an answer on June 5, 2026 at 6:25 pm

    You will have to run your program from the same command line from where you set the PATH(after setting the path, of course).

    If you are trying to run it from some other place, you should set the PATH env. variable in the Control Panel -> System first(*), then restart your command line/IDE to have the new PATH in effect

    (*) Control Panel -> System -> Advanced System Settings -> Environment Variables on Windows 7

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

Sidebar

Related Questions

I wrote a simple program to test a theory that finally block will always
I'm learning to work with lucene. I wrote a simple program to test lucene
I wrote a simple hello world program to test the JDK installation. I can
I wrote a simple C++ program to illustrate my problem: extern C{ int test(int,
I wrote a simple test program, where I was doing Complex to Complex FT's
I wrote a simple program to test array pointer: #include <iostream> using namespace std;
This is a simple program i wrote using for loop public class Test {
I wrote a simple test program in c++ but why does this crash on:
I wrote a very simple program named test.py which looks like this: print 'hello
I wrote an XML RPC server in python and a simple Test Client for

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.