Ask Your Question
0

Qt+OpenCV file not recognized: File format not recognized

asked 2014-02-04 18:54:14 -0500

keydon3 gravatar image

updated 2014-02-05 07:45:03 -0500

Hi, i tried to built OpenCV 2.4.8 for QtCreator(Qt 5.2.0 for Windows 32-bit MinGW 4.8, OpenGL). I followed these instructions and received a mistake:

D:\Programs\OpenCV\opencv_cmd\install\x64\mingw\bin\opencv_ffmpeg248_64.dll:-1: ошибка(error): file not recognized: File format not recognized

i found this question, but i use OpenCV 2.4.8 and and it had to be fixed. I'm not one who has this problem. I tried use 2.4.7 OpenCV but but nothing changes.

How i can fix it?

//cvHello.pro 
 QT       += core 
 QT         -= gui

TARGET = cvHello 
CONFIG   += console 
CONFIG   -= app_bundle

TEMPLATE = app INCLUDEPATH += D:/Programs/OpenCV/opencv/opencv_bin/install/include 
LIBS += D:/Programs/OpenCV/opencv/opencv_bin/bin/*.dll 
LIBS += D:/Programs/OpenCV/opencv/opencv_bin/lib/*.a

SOURCES += main.cpp OTHER_FILES +=  img.JPG

P.S. Windows 7 Pro x64 Upd: I removed "LIBS += D:/Programs/OpenCV/opencv/opencv_bin/bin/*.dll" from cvHello.pro, but the program still does not work. image description

edit retag flag offensive close merge delete

Comments

Like suggested in the topic you linked, you need to pull the latest 2.4 branch from github, which is older than the 2.4.8 source code download from the main download page. It contains a fix for this. Build that version and it will work perfectly. If this helps, please close down your question.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-02-05 02:50:23 -0500 )edit
1

try to remove this line :

LIBS += D:/Programs/OpenCV/opencv/opencv_bin/bin/*.dll

(you need to link against the libs(*.a) but not against the dlls.)

berak gravatar imageberak ( 2014-02-05 03:19:36 -0500 )edit

I tried it and the error disappeared, but the program still does not work. I added screen above.

keydon3 gravatar imagekeydon3 ( 2014-02-05 07:45:33 -0500 )edit

I will have to skip this one :) have no clue here on how to proceed...

StevenPuttemans gravatar imageStevenPuttemans ( 2014-02-05 07:50:34 -0500 )edit

HI

Have you found a solution?

I have exactly the same problem with version 247 and 248 but not on 246. thanks

ooznerol gravatar imageooznerol ( 2014-03-19 12:51:53 -0500 )edit

1 answer

Sort by » oldest newest most voted
0

answered 2019-05-23 22:27:33 -0500

You should select right kits, such as I compile OpenCV with mingw730_64, so I select MinGW 64.

image description

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-02-04 18:54:14 -0500

Seen: 3,977 times

Last updated: Feb 05 '14