Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Thursday, May 11, 2006 9:00:14 AM(UTC)
jljamison

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?


 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Tuesday, May 16, 2006 11:47:31 AM(UTC)

Amin  
Amin

Groups: Manager, Tech Support
Posts: 353


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.
LEAD Logo
 
#3 Posted : Thursday, December 7, 2006 12:06:18 PM(UTC)

snutt  
snutt

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:34:03 AM(UTC)

Amin  
Amin

Groups: Manager, Tech Support
Posts: 353


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.
LEAD Logo
 
#5 Posted : Monday, December 11, 2006 5:01:14 AM(UTC)

snutt  
snutt

Groups: Registered
Posts: 2


Thanks for the help.  That worked like a charm.

Steve
 
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.

Powered by YAF.NET | YAF.NET © 2003-2019, Yet Another Forum.NET
This page was generated in 0.152 seconds.