Ask Your Question
1

Tutorial test fails. W7 problem?

asked 2018-05-10 11:20:57 -0600

Vicente gravatar image

Tutorial test fails. W7 problem?

Hello

I am trying to set up opencv following the tutorial and I get an error. Well, I get more errors, but I cannot solve this.

I have installed on my computer:

  • windows 7 pro 64 bits sp1
  • Visual Studio 2017 community 15.6.7
  • ipp 2018.2.185

Following the installation tutorial I have chosen "Installation by Using git-bash (version>=2.14.1) and cmake (version >=3.9.1)"

I think that I have got ocv 4.0.0

I have built the library, setup vs2017 and try to test it with the sample code that comes with the tutorial.

https://docs.opencv.org/master/dd/d6e...

I have built the sample program, but I get a runtime error:

No se encuentra el punto de entrada del procedimiento MFCreateDXGIDeviceManager en la biblioteca de vínculos dinámicos MFPlat.DLL

Something like:

MFCreateDXGIDeviceManager procedure entry point not found in MFPlat.DLL

I get this error before executing my first line of code and after drawing the console window.

If I comment every line related to cv:: (Mat, imread, namedWindow, imshow and waitKey) I get no error.

I have found in the internet that MFCreateDXGIDeviceManager is for w8 and higher and I am using w7, so I think that this could be the problem, I need libs for w7 but I don´t know how to set up to use them.

I have looked for MFCreateDXGIDeviceManager, MFPlat.DLL, windows 7 and w7 in the q&a but have found no entries for the first 2, and a few non related entries for the last 2.

Can anyone please help me?

Thanks in advance.

edit retag flag offensive close merge delete

Comments

you seem to have an MFC related problem, not an opencv one.

berak gravatar imageberak ( 2018-05-10 12:05:32 -0600 )edit

I think too it is not an opencv problem try to modify your projects cmakelists.txt

LBerger gravatar imageLBerger ( 2018-05-10 12:45:01 -0600 )edit

berak, LBerger, thank you for your comments.

I have made a new MFC application and it works.

If I add the ocv includes it still run.

#include <opencv2/core.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/highgui.hpp>
using namespace cv;

If I add

Mat imagen;

I get the same runtime error

If I comment

//Mat imagen;

I still get the runtime error, although is the same situation that previous step.

If I comment the ocv includes it run again with no errors.

The error is related to MFC, but only when use ocv libs.

I have search in c:/lib for CMakeLists.txt and I have found 155 files, no one with CMAKE_MFC_FLAG

I suppose that I need to add to C:\lib\opencv\ CMakeLists.txt isn´t it?

Vicente gravatar imageVicente ( 2018-05-10 14:13:03 -0600 )edit

Do you use cmake to build your own project ? if yes modify your own cmakelists.txt.

Rebuild opencv with options -DWITH_MSMF:BOOL=OFF

LBerger gravatar imageLBerger ( 2018-05-10 15:17:55 -0600 )edit

DON'T make an MFC application, simply. opencv does not need that, at all.

berak gravatar imageberak ( 2018-05-11 01:04:33 -0600 )edit
1
LBerger gravatar imageLBerger ( 2018-05-11 03:04:51 -0600 )edit
1

@LBerger , sure it can be done. it's not nessecarily a good idea, though.

berak gravatar imageberak ( 2018-05-11 03:08:19 -0600 )edit

I use VS2017 to build my project.

The original post was related to a non MFC project.

I have tried with a console project, with an empty project and, after reading your comments, with an MFC project. I get the same error in all three cases

Vicente gravatar imageVicente ( 2018-05-11 04:29:43 -0600 )edit
1

Have you try : Rebuild opencv with options -DWITH_MSMF:BOOL=OFF

LBerger gravatar imageLBerger ( 2018-05-11 05:09:43 -0600 )edit

@LBerger , so, the MSMF VideoCapture / Writer depends on MFC ?

berak gravatar imageberak ( 2018-05-11 05:33:42 -0600 )edit

1 answer

Sort by » oldest newest most voted
0

answered 2018-05-11 07:19:03 -0600

Vicente gravatar image

New users must wait 2 days to answer own questions, so I will post as a comment.

I have deleted c:\lib and extract there the 3.4.1 prebuilt libs, re-setup path and visual studio props as the tutorial says and ... voila! the initial test program from the tutorial is running with no errors.

Berak, LBerger, thank you a lot for your help.

edit flag offensive delete link more

Comments

you can answer to your own question now

LBerger gravatar imageLBerger ( 2018-05-11 07:38:53 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-05-10 11:20:57 -0600

Seen: 999 times

Last updated: May 10 '18