inatsauolee / visual-control

Automatically exported from code.google.com/p/visual-control
0 stars 0 forks source link

Link errors come when you rebuild the project #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. download and extract the visual control zip file
2. add/remove the required c++ files in the solution (matching to the physical 
file structure)
3. Setup all include and lib paths
4. Just BUILD, then it works
5. Now just REBUILD

What is the expected output? What do you see instead?
It should be possible to run without any errors
But now it gives me lot of link errors

1>------ Rebuild All started: Project: visual-control, Configuration: Debug 
Win32 ------
1>Deleting intermediate and output files for project 'visual-control', 
configuration 'Debug|Win32'
1>Moc'ing webcamwidget.h...
1>Moc'ing visualcontrol.h...
1>Rcc'ing visualcontrol.qrc...
1>RCC: Warning: No resources in 
'd:\visual-control\visual-control\visualcontrol.qrc'.
1>Compiling...
1>facedetector.cpp
1>detailedfacedetector.cpp
1>eigenfacerecognizer.cpp
1>trainerimage.cpp
1>framecapture.cpp
1>detector.cpp
1>moc_webcamwidget.cpp
1>moc_visualcontrol.cpp
1>qrc_visualcontrol.cpp
1>webcamwidget.cpp
1>visualcontrol.cpp
1>main.cpp
1>logger.cpp
1>Generating Code...
1>Linking...
1>main.obj : error LNK2019: unresolved external symbol "public: virtual 
__thiscall gui::VisualControl::~VisualControl(void)" 
(??1VisualControl@gui@@UAE@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall 
gui::VisualControl::VisualControl(class QWidget *,class QFlags<enum 
Qt::WindowType>)" 
(??0VisualControl@gui@@QAE@PAVQWidget@@V?$QFlags@W4WindowType@Qt@@@@@Z) 
referenced in function _main
1>visualcontrol.obj : error LNK2001: unresolved external symbol "public: 
virtual struct QMetaObject const * __thiscall 
VisualControl::metaObject(void)const " 
(?metaObject@VisualControl@@UBEPBUQMetaObject@@XZ)
1>visualcontrol.obj : error LNK2001: unresolved external symbol "public: 
virtual void * __thiscall VisualControl::qt_metacast(char const *)" 
(?qt_metacast@VisualControl@@UAEPAXPBD@Z)
1>visualcontrol.obj : error LNK2001: unresolved external symbol "public: 
virtual int __thiscall VisualControl::qt_metacall(enum 
QMetaObject::Call,int,void * *)" 
(?qt_metacall@VisualControl@@UAEHW4Call@QMetaObject@@HPAPAX@Z)
1>webcamwidget.obj : error LNK2001: unresolved external symbol "public: virtual 
struct QMetaObject const * __thiscall WebcamWidget::metaObject(void)const " 
(?metaObject@WebcamWidget@@UBEPBUQMetaObject@@XZ)
1>webcamwidget.obj : error LNK2001: unresolved external symbol "public: virtual 
void * __thiscall WebcamWidget::qt_metacast(char const *)" 
(?qt_metacast@WebcamWidget@@UAEPAXPBD@Z)
1>webcamwidget.obj : error LNK2001: unresolved external symbol "public: virtual 
int __thiscall WebcamWidget::qt_metacall(enum QMetaObject::Call,int,void * *)" 
(?qt_metacall@WebcamWidget@@UAEHW4Call@QMetaObject@@HPAPAX@Z)
1>moc_visualcontrol.obj : error LNK2019: unresolved external symbol "public: 
void __thiscall gui::VisualControl::recognizeFaces(void)" 
(?recognizeFaces@VisualControl@gui@@QAEXXZ) referenced in function "private: 
static void __cdecl gui::VisualControl::qt_static_metacall(class QObject *,enum 
QMetaObject::Call,int,void * *)" 
(?qt_static_metacall@VisualControl@gui@@CAXPAVQObject@@W4Call@QMetaObject@@HPAPA
X@Z)
1>moc_visualcontrol.obj : error LNK2019: unresolved external symbol "public: 
void __thiscall gui::VisualControl::trainRecognizer(void)" 
(?trainRecognizer@VisualControl@gui@@QAEXXZ) referenced in function "private: 
static void __cdecl gui::VisualControl::qt_static_metacall(class QObject *,enum 
QMetaObject::Call,int,void * *)" 
(?qt_static_metacall@VisualControl@gui@@CAXPAVQObject@@W4Call@QMetaObject@@HPAPA
X@Z)
1>moc_visualcontrol.obj : error LNK2019: unresolved external symbol "public: 
void __thiscall gui::VisualControl::captureTrainingImage(void)" 
(?captureTrainingImage@VisualControl@gui@@QAEXXZ) referenced in function 
"private: static void __cdecl gui::VisualControl::qt_static_metacall(class 
QObject *,enum QMetaObject::Call,int,void * *)" 
(?qt_static_metacall@VisualControl@gui@@CAXPAVQObject@@W4Call@QMetaObject@@HPAPA
X@Z)
1>D:\visual-control\visual-control\Debug\visual-control.exe : fatal error 
LNK1120: 11 unresolved externals
1>Build log was saved at 
"file://d:\visual-control\visual-control\Debug\BuildLog.htm"
1>visual-control - 12 error(s), 0 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

What version of the product are you using? On what operating system?
Latest
Windows 7

Please provide any additional information below.

Original issue reported on code.google.com by hashan....@gmail.com on 23 Jun 2012 at 5:27

GoogleCodeExporter commented 9 years ago
I recently resolved this issue by removing the WebCamWidget and VisualControl 
cpp files which were in the root (not in the gui folder). I think the linker 
get confused because of those unused files with the cpp files with the same 
names in gui folder.

Original comment by hashan....@gmail.com on 8 Jul 2012 at 12:15

GoogleCodeExporter commented 9 years ago
hi ,  when i reach to bulid step in opencv-sln there is some errors 

the "link errors "comes when i bulided. 
you provide some steps to reduce link errors but i cann't understand it.
kindly can you help me on this erroes:

Error   99  error C1189: #error :  TBB is unable to run on old Windows versions; 
_WIN32_WINNT must be 0x0501 or 
greater.    g:\libraries\tbb41_20121003oss\include\tbb\internal\_tbb_windef.h   36  1   
cxcore

Error   100 error LNK1104: cannot open file 
'..\..\lib\Debug\cxcore210d.lib'    G:\libraries\OpenCV-2.1.0\build\interfaces\ffop
encv\LINK   opencv_ffmpeg

Error   102 error LNK1104: cannot open file 
'..\..\lib\Debug\cxcore210d.lib'    G:\libraries\OpenCV-2.1.0\build\tests\cxts\LINK
    cxts

Error   106 error LNK1104: cannot open file 
'..\..\lib\Debug\cxcore210d.lib'    G:\libraries\OpenCV-2.1.0\build\src\ml\LINK ml

Error   107 error LNK1104: cannot open file 
'..\..\lib\Debug\cxcore210d.lib'    G:\libraries\OpenCV-2.1.0\build\tests\cxcore\LI
NK  cxcoretest

Error   108 error LNK1104: cannot open file 
'..\..\lib\Debug\cxcore210d.lib'    G:\libraries\OpenCV-2.1.0\build\src\highgui\LIN
K   highgui

Error   109 error C1189: #error :  TBB is unable to run on old Windows versions; 
_WIN32_WINNT must be 0x0501 or 
greater.    g:\libraries\tbb41_20121003oss\include\tbb\internal\_tbb_windef.h   36  1   
cvaux

Error   110 error LNK1104: cannot open file 
'..\..\lib\Debug\cxcore210d.lib'    G:\libraries\OpenCV-2.1.0\build\tests\ml\LINK   m
ltest

Error   111 error LNK1104: cannot open file 
'..\..\lib\Debug\cxcore210d.lib'    G:\libraries\OpenCV-2.1.0\build\apps\haartraini
ng\LINK haartraining

Error   112 error LNK1104: cannot open file 
'..\..\lib\Debug\cxcore210d.lib'    G:\libraries\OpenCV-2.1.0\build\apps\haartraini
ng\LINK createsamples

Error   113 error LNK1104: cannot open file 
'..\..\lib\Debug\cxcore210d.lib'    G:\libraries\OpenCV-2.1.0\build\apps\haartraini
ng\LINK performance

Error   126 error LNK1104: cannot open file 
'..\..\lib\Debug\cxcore210d.lib'    G:\libraries\OpenCV-2.1.0\build\tests\cv\LINK   c
vtest

Error   127 error LNK1104: cannot open file 
'..\..\lib\Debug\cxcore210d.lib'    G:\libraries\OpenCV-2.1.0\build\apps\traincasca
de\LINK traincascade

Original comment by younis.b...@gmail.com on 12 Jan 2013 at 11:10

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I recently resolved this issue by removing the WebCamWidget and VisualControl 
cpp files which were in the root (not in the gui folder). I think the linker 
get confused because of those unused files with the cpp files with the same 
names in gui folder.

i delete it but the errors still there

Original comment by younis.b...@gmail.com on 12 Jan 2013 at 11:21

GoogleCodeExporter commented 9 years ago
Hello guys, i need HELP if you please!
I downloaded VS10 and followed all the steps ( VS, OPENCV210, CMAKE2.8, 
QT4.7.1, boost, TBB .....) i set all the paths, libs ....

and i am still recieving this error when runing the VisualControl project

Any help will be really appreciated!
Thanks in advance.

etienneadaher@gmail.com

1>------ Rebuild All started: Project: visual-control, Configuration: Debug 
Win32 ------
1>Build started 4/1/2013 7:36:53 PM.
1>_PrepareForClean:
1>  Deleting file "Debug\visual-control.lastbuildstate".
1>InitializeBuildStatus:
1>  Touching "Debug\visual-control.unsuccessfulbuild".
1>CustomBuild:
1>  Rcc'ing visualcontrol.qrc...
1>RCC : warning : No resources in 'C:\Users\Daher\Desktop\etd 
fyp\visual-control\visual-control\visualcontrol.qrc'.
1>  
1>  Moc'ing visualcontrol.h...
1>  Moc'ing webcamwidget.h...
1>ClCompile:
1>  detailedfacedetector.cpp
1>  facedetector.cpp
1>  eigenfacerecognizer.cpp
1>  trainerimage.cpp
1>  logger.cpp
1>  main.cpp
1>  moc_visualcontrol.cpp
1>  moc_webcamwidget.cpp
1>  framecapture.cpp
1>  detector.cpp
1>  visualcontrol.cpp
1>  webcamwidget.cpp
1>  Generating Code...
1>  qrc_visualcontrol.cpp
1>logger.obj : warning LNK4217: locally defined symbol ??1QString@@QAE@XZ 
(public: __thiscall QString::~QString(void)) imported in function "public: void 
__thiscall Logger::log(class std::basic_string<char,struct 
std::char_traits<char>,class std::allocator<char> > const &)" 
(?log@Logger@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std
@@@Z)
1>visualcontrol.obj : warning LNK4049: locally defined symbol 
??1QString@@QAE@XZ (public: __thiscall QString::~QString(void)) imported
1>webcamwidget.obj : warning LNK4049: locally defined symbol ??1QString@@QAE@XZ 
(public: __thiscall QString::~QString(void)) imported
1>qtmaind.lib(qtmain_win.obj) : warning LNK4217: locally defined symbol 
??1QString@@QAE@XZ (public: __thiscall QString::~QString(void)) imported in 
function _WinMain@16
1>logger.obj : warning LNK4217: locally defined s......................  
...............
..............
.................const &)" 
(?log@Logger@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std
@@@Z)
1>visualcontrol.obj : error LNK2001: unresolved external symbol 
"__declspec(dllimport) public: __thiscall QString::QString(char const *)" 
(__imp_??0QString@@QAE@PBD@Z)
1>visualcontrol.obj : error LNK2019: unresolved external symbol 
"__declspec(dllimport) public: class std::basic_string<char,struct 
std::char_traits<char>,class std::allocator<char> > __thiscall 
QString::toStdString(void)const " 
(__imp_?toStdString@QString@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allo
cator@D@2@@std@@XZ) referenced in function "public: void __thiscall 
gui::VisualControl::captureTrainingImage(void)" 
(?captureTrainingImage@VisualControl@gui@@QAEXXZ)
1>webcamwidget.obj : error LNK2001: unresolved external symbol 
"__declspec(dllimport) public: class std::basic_string<char,struct 
std::char_traits<char>,class std::allocator<char> > __thiscall 
QString::toStdString(void)const " 
(__imp_?toStdString@QString@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allo
cator@D@2@@std@@XZ)
1>webcamwidget.obj : error LNK2019: unresolved external symbol 
"__declspec(dllimport) public: class QString & __thiscall 
QString::setNum(float,char,int)" (__imp_?setNum@QString@@QAEAAV1@MDH@Z) 
referenced in function "protected: virtual void __thiscall 
gui::WebcamWidget::paintEvent(class QPaintEvent *)" 
(?paintEvent@WebcamWidget@gui@@MAEXPAVQPaintEvent@@@Z)
1>webcamwidget.obj : error LNK2019: unresolved external symbol 
"__declspec(dllimport) public: class QString & __thiscall 
QString::operator+=(char const *)" (__imp_??YQString@@QAEAAV0@PBD@Z) referenced 
in function "protected: virtual void __thiscall 
gui::WebcamWidget::paintEvent(class QPaintEvent *)" 
(?paintEvent@WebcamWidget@gui@@MAEXPAVQPaintEvent@@@Z)
1>C:\Users\Daher\Desktop\etd fyp\visual-control\Debug\visual-control.exe : 
fatal error LNK1120: 4 unresolved externals
1>
1>Build FAILED.
1>

Original comment by etiennea...@gmail.com on 1 Apr 2013 at 3:48

GoogleCodeExporter commented 9 years ago
Same problems here...

Anyone found out what the reason could be?

Original comment by asura.en...@gmail.com on 7 Sep 2013 at 5:18

GoogleCodeExporter commented 9 years ago
I followed all the step ,but there still exist a link error :  (LINK : fatal 
error LNK1181: can not open input file 'libgles_cm.lib'). What I can do? Thanks

Original comment by anonymou...@gmail.com on 12 Mar 2014 at 1:18

GoogleCodeExporter commented 9 years ago
I also have Linking Errors :

1>QtGuid.lib(jdmarker.obj) : error LNK2019: symbole externe non résolu 
___report_rangecheckfailure référencé dans la fonction _get_dht
1>QtGuid.lib(jdhuff.obj) : error LNK2001: symbole externe non résolu 
___report_rangecheckfailure
1>QtGuid.lib(jcmaster.obj) : error LNK2001: symbole externe non résolu 
___report_rangecheckfailure
1>QtGuid.lib(jchuff.obj) : error LNK2001: symbole externe non résolu 
___report_rangecheckfailure
1>C:\Users\Barbare\Desktop\visual-control\Debug\visual-control.exe : fatal 
error LNK1120: 1 externes non résolus

Original comment by mamine....@gmail.com on 4 Jun 2014 at 11:23

GoogleCodeExporter commented 9 years ago
the problem is solved, i reinstaled the Qt lib and rebuid it . I think the 
broblem was becaus i builded it with msvc 2012 before

Original comment by mamine....@gmail.com on 4 Jun 2014 at 5:23