qt之函式重定義

乐吴發表於2024-04-08

錯誤資訊:

/usr/bin/ld: rknnthread.o: in function `rknnThread::~rknnThread()':
***/rknnthread.cpp:14: multiple definition of `rknnThread::~rknnThread()'; rknnthread.o:/***/rknnthread.cpp:14: first defined here
/usr/bin/ld: rknnthread.o: in function `rknnThread::~rknnThread()':
***/rknnthread.cpp:14: multiple definition of `rknnThread::~rknnThread()'; rknnthread.o:/***/rknnthread.cpp:14: first defined here
/usr/bin/ld: rknnthread.o: in function `rknnThread::~rknnThread()':
**/rknnthread.cpp:14: multiple definition of `rknnThread::~rknnThread()'; rknnthread.o:/***/rknnthread.cpp:14: first defined here

原因:

.pro檔案中重複包含原始檔

SOURCES += main.cpp\
mainwindow.cpp \
MvCamera.cpp \
rknnThread.cpp \
rknnthread.cpp

相關文章