我正在尝试开发一个创建图像的应用程序,并使用双线性插值将其填充为彩色像素,然后显示它。到目前为止,我的代码如下:
#include <QtCore/QCoreApplication>
#include <opencv/cv.h>
#include <opencv/highgui.h>
#include <iostream>
#include <string>
#include <sys/stat.h>
using namespace cv;
int main()
{
Mat image;
image.create( 500, 500, CV_8UC3);
//upper left corner
Vec3b ul( 255, 0, 0 );
//upper right corner
Vec3b ur( 0, 255, 0 );
//bottom left corner
Vec3b bl( 0, 0, 255 );
//bottom right corner
Vec3b br( 255, 0, 255 );
//for(int y=0;y<image.rows; y++)
//for(int x=0;x<image.cols;x++)
// call function to add noise
namedWindow("Colored Pixels");
imshow("Colored Pixels", image);
// shows image for 5 seconds
waitKey(10000);
return 0;
}
当我在调试模式下运行程序时,我得到以下两个弹出窗口:
Unexpected GDB Exit
The gdb process exited unexpectedly (code 0)
和
Executable Failed
During startup program exited with code 0xc0000138
我的调试器日志屏幕显示以下内容:
sStarting debugger 'GdbEngine' for ABI 'x86-windows-msys-pe-32bit'...
dStart parameters: 'pixelGradient' mode: 1
dABI: x86-windows-msys-pe-32bit
dExecutable: C:\Users\encore\Desktop\Lectures\Year 3\QtCreator\pixelGradient-build-desktop-Qt_4_8_1_for_Desktop_-_MinGW__Qt_SDK__Debug\debug\pixelGradient.exe [terminal]
dDirectory: C:\Users\encore\Desktop\Lectures\Year 3\QtCreator\pixelGradient-build-desktop-Qt_4_8_1_for_Desktop_-_MinGW__Qt_SDK__Debug
dDebugger: C:\QtSDK\pythongdb\python_2.7based\gdb-i686-pc-mingw32.exe
dProject: C:\Users\encore\Desktop\Lectures\Year 3\QtCreator\pixelGradient (built: C:\Users\encore\Desktop\Lectures\Year 3\QtCreator\pixelGradient-build-desktop-Qt_4_8_1_for_Desktop_-_MinGW__Qt_SDK__Debug)
dQt: C:\QtSDK\Desktop\Qt\4.8.1\mingw
dQML server: 127.0.0.1:3768
dSysroot:
dDebug Source Loaction:
dSymbol file:
dDumper libraries: C:\QtSDK\Desktop\Qt\4.8.1\mingw\\qtc-debugging-helper\ C:\QtSDK\QtCreator\qtc-debugging-helper\168937759\ C:\Users\encore\AppData\Local\Nokia\QtCreator\qtc-debugging-helper\168937759\
d
dDebugger settings:
dUseAlternatingRowColours: false (default: false)
dFontSizeFollowsEditor: false (default: false)
dUseMessageBoxForSignals: true (default: true)
dAutoQuit: false (default: false)
dLogTimeStamps: false (default: false)
dVerboseLog: false (default: false)
dCloseBuffersOnExit: false (default: false)
dSwitchModeOnExit: false (default: false)
dUseDebuggingHelper: true (default: true)
dUseCodeModel: true (default: true)
dShowThreadNames: false (default: false)
dUseToolTips: false (default: false)
dUseToolTipsInLocalsView: false (default: false)
dUseToolTipsInBreakpointsView: false (default: false)
dUseAddressInBreakpointsView: false (default: false)
dUseAddressInStackView: false (default: false)
dRegisterForPostMortem: false (default: false)
dLoadGdbInit: true (default: true)
dScriptFile: (default: )
dWatchdogTimeout: 20 (default: 20)
dAutoEnrichParameters: false (default: false)
dTargetAsync: false (default: false)
dMaximalStackDepth: 20 (default: 20)
dAlwaysAdjustStackColumnWidths: false (default: false)
dShowStandardNamespace: true (default: true)
dShowQtNamespace: true (default: true)
dSortStructMembers: true (default: true)
dAutoDerefPointers: true (default: true)
dAlwaysAdjustLocalsColumnWidths: false (default: false)
dListSourceFiles: false (default: false)
dSkipKnownFrames: false (default: false)
dEnableReverseDebugging: false (default: false)
dAllPluginBreakpoints: true (default: true)
dSelectedPluginBreakpoints: false (default: false)
dAdjustBreakpointLocations: true (default: true)
dAlwaysAdjustBreakpointsColumnWidths: false (default: false)
dNoPluginBreakpoints: false (default: false)
dSelectedPluginBreakpointsPattern: .* (default: .*)
dBreakOnThrow: false (default: false)
dBreakOnCatch: false (default: false)
dBreakOnWarning: false (default: false)
dBreakOnFatal: false (default: false)
dAlwaysAdjustRegistersColumnWidths: false (default: false)
dAlwaysAdjustSnapshotsColumnWidths: false (default: false)
dAlwaysAdjustThreadsColumnWidths: false (default: false)
dAlwaysAdjustModulesColumnWidths: false (default: false)
dState changed from DebuggerNotReady(0) to EngineSetupRequested(1).
dQUEUE: SETUP ENGINE
dCALL: SETUP ENGINE
dTRYING TO START ADAPTER
dENABLING TEST CASE: 0
dSTARTING C:/QtSDK/pythongdb/python_2.7based/gdb-i686-pc-mingw32.exe -i mi
dGDB STARTED, INITIALIZING IT
<1show version
<2-list-features
<3set print object on
<4set breakpoint pending on
<5set print elements 10000
<6set overload-resolution off
<7handle SIGSEGV nopass stop print
<8set unwindonsignal on
<9pwd
<10set width 0
<11set height 0
<12set auto-solib-add on
<13-interpreter-exec console "maintenance set internal-warning quit no"
<14-interpreter-exec console "maintenance set internal-error quit no"
<15-interpreter-exec console "disassemble 0 0"
<16-interpreter-exec console "python execfile('C:/QtSDK/QtCreator/share/qtcreator/dumper/bridge.py')"
<17-interpreter-exec console "python execfile('C:/QtSDK/QtCreator/share/qtcreator/dumper/dumper.py')"
<18-interpreter-exec console "python execfile('C:/QtSDK/QtCreator/share/qtcreator/dumper/qttypes.py')"
<19-interpreter-exec console "bbsetup"
dADAPTER SUCCESSFULLY STARTED
dNOTE: ENGINE SETUP OK
dState changed from EngineSetupRequested(1) to EngineSetupOk(3).
dQUEUE: SETUP INFERIOR
dState changed from EngineSetupOk(3) to InferiorSetupRequested(4).
dQUEUE: SETUP INFERIOR
dCALL: SETUP INFERIOR
sSetting up inferior...
<20set substitute-path C:/iwmake/build_mingw_opensource C:/QtSDK/Desktop/Qt/4.8.1/mingw
<21set substitute-path C:/ndk_buildrepos/qt-desktop/src C:/QtSDK/Desktop/Qt/4.8.1/mingw
<22set substitute-path C:/qt-greenhouse/Trolltech/Code_less_create_more/Trolltech/Code_less_create_more/Troll/4.6/qt C:/QtSDK/Desktop/Qt/4.8.1/mingw
Attaching to 1260 (6412)
dTaking notice of pid 1260
<23attach 1260
>=thread-group-added,id="i1"
>~"GNU gdb (GDB) 7.2\n"
>~"Copyright (C) 2010 Free Software Foundation, Inc.\n"
>~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law. Type \"show copying\"\nand \"show warranty\" for details.\n"
>~"This GDB was configured as \"i686-pc-mingw32\".\nFor bug reporting instructions, please see:\n"
>~"<http://www.gnu.org/software/gdb/bugs/>.\n"
>&"show version\n"
>~"GNU gdb (GDB) 7.2\n"
>~"Copyright (C) 2010 Free Software Foundation, Inc.\n"
>~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law. Type \"show copying\"\nand \"show warranty\" for details.\n"
>~"This GDB was configured as \"i686-pc-mingw32\".\nFor bug reporting instructions, please see:\n"
>~"<http://www.gnu.org/software/gdb/bugs/>.\n"
>1^done
dPARSING VERSION: 1^done
d
dSUPPORTED GDB VERSION GNU gdb (GDB) 7.2
dCopyright (C) 2010 Free Software Foundation, Inc.
dLicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
dThis is free software: you are free to change and redistribute it.
dThere is NO WARRANTY, to the extent permitted by law. Type "show copying"
dand "show warranty" for details.
dThis GDB was configured as "i686-pc-mingw32".
dFor bug reporting instructions, please see:
d<http://www.gnu.org/software/gdb/bugs/>.
dGNU gdb (GDB) 7.2
dCopyright (C) 2010 Free Software Foundation, Inc.
dLicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
dThis is free software: you are free to change and redistribute it.
dThere is NO WARRANTY, to the extent permitted by law. Type "show copying"
dand "show warranty" for details.
dThis GDB was configured as "i686-pc-mingw32".
dFor bug reporting instructions, please see:
d<http://www.gnu.org/software/gdb/bugs/>.
d
dUSING GDB VERSION: 70200, BUILD: 2010
>2^done,features=["frozen-varobjs","pending-breakpoints","thread-info","python"]
dFEATURES: 2^done,data={features=["frozen-varobjs","pending-breakpoints","thread-info","python"]}
d
>&"set print object on\n"
>3^done
>&"set breakpoint pending on\n"
>4^done
>&"set print elements 10000\n"
>5^done
>&"set overload-resolution off\n"
>6^done
>&"handle SIGSEGV nopass stop print\n"
>~"Signal Stop\tPrint\tPass to program\tDescription\n"
>~"SIGSEGV Yes\tYes\tNo\t\tSegmentation fault\n"
>7^done
>&"set unwindonsignal on\n"
>8^done
>&"pwd\n"
>~"Working directory C:\\Users\\encore.\n"
>9^done
>&"set width 0\n"
>10^done
>&"set height 0\n"
>11^done
>&"set auto-solib-add on\n"
>12^done
>13^done
>14^done
>&"A syntax error in expression, near `0'.\n"
>15^error,msg="A syntax error in expression, near `0'."
>16^done
>17^done
>18^done
>~"dumpers=[{type=\"QLinkedList\",formats=\"\"},{type=\"QSize\",formats=\"\"},{type=\"QFileInfo\",formats=\"\"},{type=\"QAbstractItemModel\",formats=\"\"},{type=\"std__stack\",formats=\"\"},{type=\"QTextDocument\",formats=\"\"},{type=\"QTJSC__JSValue\",formats=\"\"},{type=\"__gnu_cxx__hash_set\",formats=\"\"},{type=\"QStringList\",formats=\"\"},{type=\"QRegion\",formats=\"\"},{type=\"std__wstring\",formats=\"\"},{type=\"QString\",formats=\"Inline,Separate Window\",editable=\"true\"},{type=\"QTextCodec\",formats=\"\"},{type=\"QBasicAtomicInt\",formats=\"\"},{type=\"QScriptValue\",formats=\"\"},{type=\"QTime\",formats=\"\"},{type=\"QSharedData\",formats=\"\"},{type=\"std__vector\",formats=\"\",editable=\"true\"},{type=\"QRegExp\",formats=\"\"},{type=\"QTextCursor\",formats=\"\"},{type=\"QxXmlAttributes\",formats=\"\"},{type=\"QDateTime\",formats=\"\"},{type=\"QList\",formats=\"\"},{type=\"QStandardItem\",formats=\"\"},{type=\"std__deque\",formats=\"\"},{type=\"QFixed\",formats=\"\"},{type=\"QHash\",formats=\"\"},{type=\"QSharedPointer\",formats=\"\"},{type=\"QUrl\",formats=\"\"},{type=\"std__set\",formats=\"\"},{type=\"std__list\",formats=\"\"},{type=\"std__basic_string\",formats=\"\"},{type=\"QPoint\",formats=\"\"},{type=\"QHostAddress\",formats=\"\"},{type=\"QStack\",formats=\"\"},{type=\"QScopedPointer\",formats=\"\"},{type=\"QRectF\",formats=\"\"},{type=\"QMultiMap\",formats=\"\"},{type=\"QMapNode\",formats=\"\"},{type=\"QModelIndex\",formats=\"Normal,Enhanced\"},{type=\"QLocale\",formats=\"\"},{type=\"QSharedDataPointer\",formats=\"\"},{type=\"QVariant\",formats=\"\"},{type=\"string\",formats=\"\",editable=\"true\"},{type=\"QBasicAtomicPointer\",formats=\"\"},{type=\"QVector\",formats=\"\",editable=\"true\"},{type=\"QDate\",formats=\"\"},{type=\"QFile\",formats=\"\"},{type=\"QAtomicInt\",formats=\"\"},{type=\"TBuf\",formats=\"\"},{type=\"QWeakPointer\",formats=\"\"},{type=\"QSizeF\",formats=\"\"},{type=\"__m128\",formats=\"As Floats,As Doubles\"},{type=\"boost__optional\",formats=\"\"},{type=\"wstring\",formats=\"\"},{type=\"QPointF\",formats=\"\"},{type=\"TLitC\",formats=\"\"},{type=\"QRect\",formats=\"\"},{type=\"QByteArray\",formats=\"\"},{type=\"QMap\",formats=\"\"},{type=\"boost__shared_ptr\",formats=\"\"},{type=\"QChar\",formats=\"\"},{type=\"QDir\",formats=\"\"},{type=\"QPixmap\",formats=\"\"},{type=\"QFlags\",formats=\"\"},{type=\"std__map\",formats=\"\"},{type=\"QHashNode\",formats=\"\"},{type=\"QTemporaryFile\",formats=\"\"},{type=\"QObject\",formats=\"\"},{type=\"Eigen__Matrix\",formats=\"\"},{type=\"std__string\",formats=\"\",editable=\"true\"},{type=\"QImage\",formats=\"Normal,Displayed\"},{type=\"QSet\",formats=\"\"},],hasInferiorThreadList=\"1\"\n"
>19^done
>&"set substitute-path C:/iwmake/build_mingw_opensource C:/QtSDK/Desktop/Qt/4.8.1/mingw\n"
>20^done
>&"set substitute-path C:/ndk_buildrepos/qt-desktop/src C:/QtSDK/Desktop/Qt/4.8.1/mingw\n"
>21^done
>&"set substitute-path C:/qt-greenhouse/Trolltech/Code_less_create_more/Trolltech/Code_less_create_more/Troll/4.6/qt C:/QtSDK/Desktop/Qt/4.8.1/mingw\n"
>22^done
>&"attach 1260\n"
>~"Attaching to process 1260\n"
>=thread-group-started,id="i1",pid="1260"
sThread group i1 created
>=thread-created,id="1",group-id="i1"
sThread 1 created
>~"[New Thread 1260.0x190c]\n"
s[New Thread 1260.0x190c]
>23^running
Inferior attached, thread 6412 resumed
sSetting breakpoints...
dSetting breakpoints...
<24maint print msymbols C:/Users/encore/AppData/Local/Temp/gdb_ns_.Dq6408
>*running,thread-id="all"
>=thread-created,id="2",group-id="i1"
sThread 2 created
>~"[New Thread 1260.0xf9c]\n"
s[New Thread 1260.0xf9c]
>*running,thread-id="all"
>=thread-exited,id="2",group-id="i1"
sThread 2 in group i1 exited
>=thread-exited,id="1",group-id="i1"
sThread 1 in group i1 exited
>=thread-group-exited,id="i1"
sThread group i1 exited
>&"During startup program exited with code 0xc0000138.\n"
>23^error,msg="During startup program exited with code 0xc0000138."
dCOOKIE FOR TOKEN 23 ALREADY EATEN (InferiorSetupRequested). TWO RESPONSES FOR ONE COMMAND?
dNOTE: INFERIOR EXITED
dState changed from InferiorSetupRequested(4) to InferiorExitOk(16).
dState changed from InferiorExitOk(16) to InferiorShutdownOk(19).
dState changed from InferiorShutdownOk(19) to EngineShutdownRequested(20).
dQUEUE: SHUTDOWN ENGINE
sExecutable failed: During startup program exited with code 0xc0000138.
dCALL: SHUTDOWN ENGINE
dINITIATE GDBENGINE SHUTDOWN IN STATE 0, PROC: 2
<25-gdb-exit
>&"maint print msymbols C:/Users/encore/AppData/Local/Temp/gdb_ns_.Dq6408\n"
>24^done
dFOUND NON-NAMESPACED QT
dNOTE: INFERIOR SETUP OK
dState changed from EngineShutdownRequested(20) to InferiorSetupOk(6).
dState changed from InferiorSetupOk(6) to EngineRunRequested(7).
dQUEUE: RUN ENGINE
dCALL: RUN ENGINE
dNOTE: ENGINE RUN AND INFERIOR STOP OK
dState changed from EngineRunRequested(7) to InferiorStopOk(14).
dNOTE: INFERIOR RUN REQUESTED
dState changed from InferiorStopOk(14) to InferiorRunRequested(10).
sRunning requested...
<26-exec-continue
>25^exit
dGDB CLAIMS EXIT; WAITING
dGDB PROCESS FINISHED, status 0, code 0
dNOTE: ENGINE ILL ******
dState changed BY FORCE from InferiorRunRequested(10) to InferiorStopRequested(13).
dATTEMPT TO INTERRUPT INFERIOR
sStop requested...
dTRYING TO INTERRUPT INFERIOR
dCANNOT INTERRUPT 1260
你对我如何处理这个问题有任何想法吗?
答案 0 :(得分:0)
退出代码0xc0000138是STATUS_ORDINAL_NOT_FOUND
(我是perl -MWin32::Status -E 'say $Win32::Status::INTEGER_TO_SYMBOL{ 0xc0000138 }'
检查过的,它也可以在ntstatus.h标题中找到,例如http://source.winehq.org/source/include/ntstatus.h)
“未找到序号”错误表示无法找到DLL提供的某些功能;可能是加载了错误版本的DLL。我不确定当DLL完全丢失时是否会产生相同的错误。
您可以验证以下内容吗?
<opencv/*>
标题LIBS+=...
陈述。这里有一个例子 - http://mobidevelopers.wordpress.com/2009/01/29/qt-and-opencv/ 答案 1 :(得分:0)
没关系,我只是重新安装了一切。似乎有些文件与我过去做过的另一个安装相撞;)