Home › Forums › TWAIN Classic › Noob Question – How to compile TWAIN?
- This topic has 5 replies, 3 voices, and was last updated 13 years, 10 months ago by twainuser123.
- AuthorPosts
Hi,
I am a relatively new programmer (3 years) and am trying to use TWAIN.
However, when I try to compile this code in MSVC++2008:
#include "twain.h"
int main()
{
return 0;
}I get 174 errors like
error C2146: syntax error : missing ';' before identifier 'TW_HANDLE'
How do I make it work?
Thanks in advance!
#include "twain.h"
int main()
{
return 0;
}
You are missing declarations required in twain.h.
#include
#include "twain.h"
int main()
{
return 0;
}
solves that.
Best regards,
Kaij
It compiled!
Thanks for your help!But, I have two more questions:
1. Is twain.h dependent on any other files or libraries besides windows.h?
2. How would I be able to compile twain.h for Linux Ubuntu?Thanks in advance!
I found at least one of the answers through time…
1. Yes, twain_32.dll for TWAIN 1.X and twainDSM.dll for TWAIN 2.X applications. You need to load the DSM_Entry() function to work with TWAIN.
No need to respond. Just noting this here for future forum searches.
Check command prompt sample application from TWAIN Working Group:
http://sourceforge.net/projects/twain-samples/files/Thanks, but I got it working now.
- AuthorPosts