Home › Forums › TWAIN Classic › twain.h with C++Builder
- This topic has 1 reply, 2 voices, and was last updated 13 years, 8 months ago by twainuser123.
- AuthorPosts
Hi there,
When I try to compile a project under C++ Builder6 with twain.h the compiler shows me the error:
[C++ Fatal Error] twain.h(130): F1003 Error directive: Unrecognized compiler
I read in the C++Builder’s help that __BORLANDC__ is a global identifier, not __BORLAND__.
I tried changing the identifier __BORLAND__ for __BORLANDC__ but the errors increased:[C++ Error] twain.h(1863): E2257 , expected
[C++ Error] twain.h(1864): E2238 Multiple declaration for ‘huge’
[C++ Error] twain.h(1863): E2344 Earlier declaration of ‘huge’
[C++ Error] twain.h(1864): E2257 , expected
[C++ Error] twain.h(2066): E2238 Multiple declaration for ‘TW_UINT16’
[C++ Error] twain.h(209): E2344 Earlier declaration of ‘TW_UINT16’
[C++ Error] twain.h(2066): E2356 Type mismatch in redeclaration of ‘TW_UINT16’
[C++ Error] twain.h(209): E2344 Earlier declaration of ‘TW_UINT16’
[C++ Error] twain.h(2066): E2141 Declaration syntax error
[C++ Error] twain.h(2139): E2238 Multiple declaration for ‘TW_UINT16’
[C++ Error] twain.h(2066): E2344 Earlier declaration of ‘TW_UINT16’
[C++ Error] twain.h(2139): E2141 Declaration syntax error
[C++ Error] twain.h(2178): E2075 Incorrect pragma directive option: ÿ–a.
[C++ Warning] twain.h(2191): W8059 Structure packing size has changed
[C++ Warning] _prolog.h(47): W8059 Structure packing size has changed
[C++ Warning] _prolog.h(19): W8059 Structure packing size has changed
[C++ Warning] _epilog.h(32): W8059 Structure packing size has changed
[C++ Warning] _epilog.h(38 ): W8059 Structure packing size has changedI downloaded the twain19.h and with it I could compile the project.
Is there a solution that allows me to use twain.h with C++Builder6?
thanks in advance,
EfrenI don’t know if you tried this, but type this BEFORE including twain.h:
#undef __BORLANDC__
#define __BORLAND__Otherwise, modify this line in twain.h
#else
#error Unrecognized compilerto
#else
#define TWH_CMP_BORLAND
#define TWH_32BITNote this breaks the compiler portability of twain.h
Hope that helps.
- AuthorPosts