qt之函数重定义

错误信息:

/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

posted @ 2024-04-08 15:18  乐吴  阅读(24)  评论(0编辑  收藏  举报