Home › Forums › TWAIN Classic › twain on linux
- This topic has 5 replies, 3 voices, and was last updated 15 years, 1 month ago by jimwatters.
- AuthorPosts
I have read that twain 2.0 is available on linux platforms.
1) I suppose it needs to be installed on linux, may i ask how to install it?
For instance on ubuntu and possibly also suse linux2) I suppose to work with a scanner i need a linux/twain driver.
Where is a list of the available drivers?
Do i need to install the driver separately?Thanks
Where is a list of the available drivers?
there isn’t one, nor is there one for windows or mac.
Do i need to install the driver separately?
yes.
As regard the first question, i found there is a link to the data source manager on the main page.
I am trying to install the example application on linux ubuntu.
I mean the one at this urlhttps://sourceforge.net/project/showfiles.php?group_id=212173 .
I followed the instructions but when i make i get this
main.cpp: In function âvoid EnableDS()â:
main.cpp:312: error: âMSGâ was not declared in this scope
main.cpp:312: error: expected `;’ before âMsgâ
main.cpp:314: error: âLPMSGâ was not declared in this scope
main.cpp:314: error: âMsgâ was not declared in this scope
main.cpp:314: error: âGetMessageâ was not declared in this scope
main.cpp:319: error: âMsgâ was not declared in this scope
main.cpp:348: error: âLPMSGâ was not declared in this scope
main.cpp:348: error: âTranslateMessageâ was not declared in this scope
main.cpp:349: error: âDispatchMessageâ was not declared in this scope
make: *** [main.o] Error 1what’s wrong?
it looks to me (when reading TranslateMessage & DispatchMessage) that you’re compiling the windows source. there should have been a #define that caused the compile to only compile the *nix code. Or are TranslateMessage & DispatchMessage defined under your *nix platform?
What are you compiling with?
.
root@test-rfid:/tmp/twainapp.source.2.0.5/Twain_App_sample01/src# qmake src.pro
root@test-rfid:/tmp/twainapp.source.2.0.5/Twain_App_sample01/src# make
Yes you have discovered a bug in the code.
some #ifdef TWH_CMP_MSC around the code for MSG should resolve it for Linux for now.#ifdef TWH_CMP_MSC
MSG Msg;
if(!GetMessage((LPMSG)&Msg, NULL, 0, 0))
{
break;//WM_QUIT
}
#endif
#ifdef TWH_CMP_MSC
TranslateMessage ((LPMSG)&Msg);
DispatchMessage ((LPMSG)&Msg);
#endif
Regards,
Jim Watters**************************************************
JFL Peripheral Solutions Inc.
http://www.jflinc.com/
Your Expert Source of Custom Software and Services
for TWAIN Applications, Data Sources,
Peripheral Drivers and Support Software.
**************************************************- AuthorPosts