LEADTOOLS Support
General
General Questions
Link error with C++ classlib V14.5 LTwain::GetNumericContainerUNICODEValue
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Thursday, May 11, 2006 8:55:14 AM(UTC)
Groups: Registered
Posts: 19
I am including the following libraries in my link statement:
ltwvc_n.lib lttwn_n.lib
however there is a missing symbol
error LNK2001: unresolved external symbol "public: virtual int
__thiscall LTwain::GetNumericContainerUNICODEValue(struct TW_CAPABILITY
*,int,wchar_t * const)"
(?GetNumericContainerUNICODEValue@LTwain@@UAEHPAUTW_CAPABILITY@@HQA_W@Z)
The link error goes away if I add the stub
L_INT LTwain::GetNumericContainerUNICODEValue(TW_CAPABILITY *, L_INT, TW_UNI512) {
return TWAIN_SUCCESS;
}
somewhere in my code. Seems like LTwain should provide its own
method. I am not using the UNICODE version of things. Any
suggestions?
#2
Posted
:
Tuesday, May 16, 2006 11:42:31 AM(UTC)
Groups: Manager, Tech Support
Posts: 367
Was thanked: 1 time(s) in 1 post(s)
John,
Thank you for sending a test project to our support email.
Using that project, it turned out the cause of the problem was that the compiler option (Zc:wchar_t) is turned On. The following steps disable this option:
1. Open the project properties and go to C/C++
2. Under 'Language', there is an option named "Treat wchar_t as Built-in Type".
3. If it is "Yes (/Zc:wchar_t)", change it to "No"
Amin Dodin
Senior Support Engineer
LEAD Technologies, Inc.
#3
Posted
:
Thursday, December 7, 2006 12:01:18 PM(UTC)
Groups: Registered
Posts: 2
Can you tell me if this has been fixed in version 15, or if there is another workaround? We use other libraries that require wchar_t to be the built in type, so doing this would create link errors in our other libraries.
Thanks,
Steve
#4
Posted
:
Sunday, December 10, 2006 6:29:03 AM(UTC)
Groups: Manager, Tech Support
Posts: 367
Was thanked: 1 time(s) in 1 post(s)
Steve,
You can work around this by modifying the file ltcscnnr.h and changing the line:
virtual L_INT GetNumericContainerUNICODEValue(TW_CAPABILITY * pCapability, L_INT nIndex, TW_UNI512 twUniCode);
To become:
virtual L_INT GetNumericContainerUNICODEValue(TW_CAPABILITY * pCapability, L_INT nIndex, myTW_UNI512 twUniCode);
The type myTW_UNI512 is defined like this:
typedef unsigned short myTW_UNI512[512];
However, if you do this change, you will need to re-do it again every time you install LEADTOOLS or its service pack/patches. Of course, if you forget to do the change, you will get the same linker error when you rebuild your project.
Amin Dodin
Senior Support Engineer
LEAD Technologies, Inc.
#5
Posted
:
Monday, December 11, 2006 4:56:14 AM(UTC)
Groups: Registered
Posts: 2
Thanks for the help. That worked like a charm.
Steve
LEADTOOLS Support
General
General Questions
Link error with C++ classlib V14.5 LTwain::GetNumericContainerUNICODEValue
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.