QT Error with Twain Data Source
-
wrote on 19 Dec 2017, 22:33 last edited by
Hi , I have been using Sample Twain Data Source from Twain .org. QT is a prerequisite for this application which is in C++. I am getting below errors when i try to compile Twain data source.
Any help with these error is appreciated
Error 4 fatal error C1083: Cannot open source file: '..\src\GeneratedFiles\Win32\Debug\moc_Qt_About.cpp': No such file or directory c1xx
Error 5 fatal error C1083: Cannot open source file: '..\src\GeneratedFiles\Win32\Debug\moc_Qt_MainForm.cpp': No such file or directory c1xx
Error 6 fatal error C1083: Cannot open source file: '..\src\GeneratedFiles\Win32\Debug\moc_Qt_ProfileName.cpp': No such file or directory c1xx
Error 7 fatal error C1083: Cannot open source file: '..\src\GeneratedFiles\qrc_qtresources.cpp': No such file or directory c1xx
Error 8 error BK1506 : cannot open file '.\Debug32\Qt_About.sbr': No such file or directory BSCMAKEError 1 fatal error C1083: Cannot open include file: 'ui_About.h': No such file or directory c:\odiimages\source\twain\twain-samples\twain_ds_sample01\src\qt_about.cpp 2
Error 2 fatal error C1083: Cannot open include file: 'ui_MainForm.h': No such file or directory c:\odiimages\source\twain\twain-samples\twain_ds_sample01\src\qt_mainform.cpp 2
Error 3 fatal error C1083: Cannot open include file: 'ui_ProfileName.h': No such file or directory c:\odiimages\source\twain\twain-samples\twain_ds_sample01\src\qt_profilename.cpp 2
The Twain Data source project is availabel at https://sourceforge.net/projects/twain-samples/files/TWAIN 2 Sample Data Source/TWAIN DS 2.1.3/
-
Hi and welcome
What do you compile it with ?
Seems not be setup running the moc tool an ui tool.
http://doc.qt.io/archives/qt-4.8/moc.html
Are you using Qt Creator?Its very old. QT 4.5.3. For newer Qt you will have to port some of the classes.
-
wrote on 20 Dec 2017, 01:18 last edited by
@mrjj said in QT Error with Twain Data Source:
What do you compile it with ?
I m compiling it with Visual Studio 2008 and not using QT Creator. Can you please guide me where i can get moc tool and ui tool?
-
@mrjj said in QT Error with Twain Data Source:
What do you compile it with ?
I m compiling it with Visual Studio 2008 and not using QT Creator. Can you please guide me where i can get moc tool and ui tool?
Hi
They are included but visual studio knows nothing about it.
Often a plugin for VS is used to help make this happen.
Not sure there is plugin for 2008.
2013 seems to be the oldest
https://download.qt.io/official_releases/vsaddin/
but it seems to have existed
https://forum.qt.io/topic/5722/solved-how-generate-moc-files-automatically-using-visual-studio-2008so maybe i just need more coffee ;)
also this seems the newest Qt that works with vs2008
https://download.qt.io/official_releases/qt/4.8/4.8.7/ -
wrote on 20 Dec 2017, 19:43 last edited by bhim
-
Hi
you installed
qt-opensource-windows-x86-vs2008-4.8.7.exe ?
and you had vs 2008 already installed?what does it list in Qt versions tab?
-
wrote on 20 Dec 2017, 19:51 last edited by
Yes, i installed and used qt-opensource-windows-x86-vs2008-4.8.7.exe
It list only None in QT Version tab.
I had vs 2008 also already installed.
Please help.
-
Yes, i installed and used qt-opensource-windows-x86-vs2008-4.8.7.exe
It list only None in QT Version tab.
I had vs 2008 also already installed.
Please help.
@bhim
Hi
It should have picked it up.
Not sure what went wrong.
Sadly i dont have any vs 2008 to test with and not sure why no Qt is listed.Give some time. Maybe someone is still using vs2008 :)
-
wrote on 20 Dec 2017, 20:01 last edited by
-
Also this is what i have installed, can this be the culprit?
Meantime i will also try on a machine where vs2008 is not installed.
@bhim
Did you also install a QT binary ?
That is only the editor
named something like Qt 2008 visual studio 2008can you show image of all that can be selected?
-
wrote on 20 Dec 2017, 20:16 last edited by
I am not sure if i installed QT binary. Can you please provide me download path? Also the QT Version drop down is only show None.
-
wrote on 20 Dec 2017, 20:53 last edited by
-
Hi ,
Thanks for your help. I m able to open and configure the project now. But getting below error when i build it. Can you please have a look and help.
@bhim
seem to be kinda old/invalid .pro file
can you show what is inside? -
wrote on 20 Dec 2017, 21:08 last edited by
Below is the content of pro file
unix {
TEMPLATE = subdirs
VERSION = 1.0
DEFINES += UNIX
}SUBDIRS = src
I have also shared entire project at below location for you.
https://drive.google.com/drive/folders/1gj69Kh7Xy8-p91uE3QUao673wqxoHidx?usp=sharing
-
Below is the content of pro file
unix {
TEMPLATE = subdirs
VERSION = 1.0
DEFINES += UNIX
}SUBDIRS = src
I have also shared entire project at below location for you.
https://drive.google.com/drive/folders/1gj69Kh7Xy8-p91uE3QUao673wqxoHidx?usp=sharing
-
wrote on 20 Dec 2017, 21:58 last edited by
Thanks It much better now. Though i am still getting lot of errors but these are datatype error and seems like code specific.
Thanks a lot for your help.
Bhim
-
Thanks It much better now. Though i am still getting lot of errors but these are datatype error and seems like code specific.
Thanks a lot for your help.
Bhim
@bhim
Np.
I noticed there are some FreeImage lib files.
Not sure it uses it but make sure they are compatible with vs 2008 if it does.Its pretty old project. there are no newer twain samples?
-
wrote on 20 Dec 2017, 22:10 last edited by bhim
-
This is the latest sample they have. With this i m getting below error , would you be able to help with this one as well?
I know how to take care of these in VS but not in QT.
@bhim
Well Qt is just a normal c++ LIB
and those are normal windows API calls so fix them like you normal would.
seems to be unicode related.
Didnt it later become common to put _TCHAR or something in front ?
or use wchar_t* and not char * ?
maybe you can just use the A version of the API and not W version -
Hi
I wondered if
https://github.com/twain/twain-samples
is something else than the twain you try ?
1/37