PDA

View Full Version : Troubles linking TIS_UDSHL06_vc6



Unregistered
April 2, 2005, 00:23:37
Hello, has anyone any insight to the following problem? I've just installed Imaging Control 2.1 Class Library on my XP system. I'm using Visual Studio 6.0. When I try to link to either the TIS_UDSHL06_v6 or TIS_UDSHL06_v6d libraries, I get the following linking errors. Some, but not all, of the methods cannot be linked to in the libraries. For example, if I remove TIS_UDSHL06_v6 from the linking, then I get a much longer list of unresolved externals. Dependency walker shows that methods are there, but for some reason they are not linking.

Any help is appreciated. Thanks.

Phil

CAM.lib(CAM_ImagingControl.o) : error LNK2001: unresolved external symbol "__dec
lspec(dllimport) public: class smart_ptr<class std::vector<class DShowLib::Analo
gChannelItem,class std::__default_alloc_template<1,0> >,class refcount_ptr<class
std::vector<class DShowLib::AnalogChannelItem,class std::__default_alloc_templa
te<1,0> > > > __thiscall DShowLib::Grabber::getAvailableInputChannels(void) const
" (__imp_?getAvailableInputChannels@Grabber@DShowLib @@QBE?AV?$smart_ptr@V?$vect
or@VAnalogChannelItem@DShowLib@@V?$__default_alloc _template@$00$0A@@std@@@std@@V
?$refcount_ptr@V?$vector@VAnalogChannelItem@DShowL ib@@V?$__default_alloc_templat
e@$00$0A@@std@@@std@@@@@@XZ)
CAM.lib(CAM_ImagingControl.o) : error LNK2001: unresolved external symbol "__dec
lspec(dllimport) public: class smart_ptr<class std::vector<class DShowLib::Video
NormItem,class std::__default_alloc_template<1,0> >,class refcount_ptr<class std
::vector<class DShowLib::VideoNormItem,class std::__default_alloc_template<1,0>
> > > __thiscall DShowLib::Grabber::getAvailableVideoNorms(void)con st " (__imp_?
getAvailableVideoNorms@Grabber@DShowLib@@QBE?AV?$s mart_ptr@V?$vector@VVideoNormI
tem@DShowLib@@V?$__default_alloc_template@$00$0A@@ std@@@std@@V?$refcount_ptr@V?$
vector@VVideoNormItem@DShowLib@@V?$__default_alloc _template@$00$0A@@std@@@std@@@
@@@XZ)
CAM.lib(CAM_ImagingControl.o) : error LNK2001: unresolved external symbol "__dec
lspec(dllimport) public: class smart_ptr<class std::vector<class DShowLib::Video
CaptureDeviceItem,class std::__default_alloc_template<1,0> >,class refcount_ptr<
class std::vector<class DShowLib::VideoCaptureDeviceItem,class std::__default_al
loc_template<1,0> > > > __thiscall DShowLib::Grabber::getAvailableVideoCaptureDe
vices(void)const " (__imp_?getAvailableVideoCaptureDevices@Grabber@DS howLib@@QBE
?AV?$smart_ptr@V?$vector@VVideoCaptureDeviceItem@D ShowLib@@V?$__default_alloc_te
mplate@$00$0A@@std@@@std@@V?$refcount_ptr@V?$vecto r@VVideoCaptureDeviceItem@DSho
wLib@@V?$__default_alloc_template@$00$0A@@std@@@st d@@@@@@XZ)
CAM.lib(CAM_ImagingControl.o) : error LNK2001: unresolved external symbol "__dec
lspec(dllimport) public: bool __thiscall DShowLib::Grabber::loadDeviceState(clas
s std::basic_string<char,class std::char_traits<char>,class std::__default_alloc
_template<1,0> > const &,bool)" (__imp_?loadDeviceState@Grabber@DShowLib@@QAE_NA
BV?$basic_string@DV?$char_traits@D@std@@V?$__defau lt_alloc_template@$00$0A@@2@@s
td@@_N@Z)
CAM.lib(CAM_ImagingControl.o) : error LNK2001: unresolved external symbol "__dec
lspec(dllimport) public: bool __thiscall DShowLib::VideoCaptureDeviceItem::opera
tor==(class std::basic_string<char,class std::char_traits<char>,class std::__def
ault_alloc_template<1,0> > const &)const " (__imp_??8VideoCaptureDeviceItem@DSho
wLib@@QBE_NABV?$basic_string@DV?$char_traits@D@std @@V?$__default_alloc_template@
$00$0A@@2@@std@@@Z)
age_cam_capture1394.exe : fatal error LNK1120: 5 unresolved externals
make: *** [age_cam_capture1394.exe] Error 96

Phil
April 2, 2005, 00:31:08
One more thing. I am compiling from command-line. I have basically taken the code from the examples and put it in a class of my own. I can get the example to compile but not in my own class. Go figure.

Stefan Geissler
April 4, 2005, 08:49:26
Hello Phil

The smartprt and smartcom templates are in header files, not in cpp files. Therefore, you should include the TISUDSHL.H into your project's cpp files to include them into your project. A good place to include the tisudshl.h is the stdafx.h.

Phil
April 6, 2005, 00:04:38
Thanks for the advice.

I'm aware that the smart_ptr is in a header file. I've already included TISUDSHL.H in my header, and I tried to include it in the CPP as you suggest (by making the grabber a pointer), but it still has the same problem. The examples don't seem to have this problem. As for StdAfx.h, I don't have one. As I mentioned before, I am compiling from the command line, and my make system is not setup to use precompiled header files.

To be honest, I suspect it is not an issue with the smart_ptr, because it is Grabber methods (returning smart pointers, in some cases) that is the problem. For example, loadDeviceState does not link, but it does not use smart pointers.

Phil
April 7, 2005, 00:22:54
Finally, I got it to link. Turned out that our use of SGI STL was conflicting with ImagingSource's use of VC6's distribution of Dinkumware STL. This explains why only the methods with std arguments could not link, but the rest of the library linked okay. I was able to compile our CAM lib (which wraps your driver) with the Dinkumware STL, and the rest of our project uses SGI STL. So far, it seems to work.

Stefan Geissler
April 7, 2005, 13:49:28
Phil

Thank you for posting your solution.