Reputation: 275
I have compiled OpenV 3.1 with Qt Creator 3.6.0 32bits in Win10 machine.
While building a sample OpenCV program it gives me [Makefile]Error 3
with these details:
10:02:32: Running steps for project Sanj...
10:02:32: Configuration unchanged, skipping qmake step.
10:02:32: Starting: "C:\Qt\Tools\mingw492_32\bin\mingw32-make.exe"
C:\Qt\5.5\mingw492_32\bin\qmake.exe -spec win32-g++ "CONFIG+=debug" "CONFIG+=qml_debug" -o Makefile ..\Sanj\Sanj.pro
makefile:195: recipe for target 'Makefile' failed
C:/Users/Samir Chohg/Desktop/Sanj/Sanj.pro:27: Extra characters after test expression.
Error processing project file: ..\Sanj\Sanj.pro
mingw32-make: *** [Makefile] Error 3
10:02:32: The process "C:\Qt\Tools\mingw492_32\bin\mingw32-make.exe" exited with code 2.
Error while building/deploying project Sanj (kit: Desktop Qt 5.5.1 MinGW 32bit)
When executing step "Make"
The code is:
QT += core
QT -= gui
TARGET = Un
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp
INCLUDEPATH += C:/opencv/qttest/install/include
LIBS += -LC:/opencv/qttest/install/x86/mingw/bin
-lopencv_core310 \
-lopencv_highgui310 \
-lopencv_imgproc310 \
-lopencv_features2d310 \
-lopencv_calib3d310
Can someone show me where the problem is? Thanks in advance.
Upvotes: 1
Views: 12916
Reputation: 1756
My problem was that there was a package i needed that i didnt have yet.
Go to the Compile Output tab.
If you get an error that looks like this:
Then you need to install the packages not found. In my case, it was the multimedia package.
The easiest way I found to add it was to go to Add or Remove Programs in Windows settings and click the Modify button for Qt. This will open up the Qt Maintenance Tool. Once you sign in, select Add or Remove Components, and under Qt, find your current version of Qt (mine was 6.5.3), go to Additional Libraries, and select the packages you need. Then click Next.
This should install the packages you need and then you can go back to Qt Creator
Upvotes: 0
Reputation: 10857
You are missing the line continuation character on the LIBS += line.
Change
LIBS += -LC:/opencv/qttest/install/x86/mingw/bin
-lopencv_core310 \
-lopencv_highgui310 \
-lopencv_imgproc310 \
-lopencv_features2d310 \
-lopencv_calib3d310
to
LIBS += -LC:/opencv/qttest/install/x86/mingw/bin \
-lopencv_core310 \
-lopencv_highgui310 \
-lopencv_imgproc310 \
-lopencv_features2d310 \
-lopencv_calib3d310
Upvotes: 1