I want to buy license for QR codes read and generating from Leadtools but first I want to try their demo tools. I'm using MSVC 2013 x64 compiler. I think I did everything as follows in documentation:
- Copied all dll's to my project directory (where build and release folder are located)
- Copied Include and Lib folders to my project directory and add this lines to .pro file.
LIBS += -L$$PWD/Lib/CDLLVC12/x64/ -lLtkrn_x
INCLUDEPATH += $$PWD/Include
PRE_TARGETDEPS += $$PWD/Bin/CDLLVC12/x64/Ltkrnx.dll
include and #define LTV19_CONFIG, here is my code:
#define LTV19_CONFIG #include <iostream> #include <Ltkrn.h> #include <ClassLib/LtWrappr.h> using namespace std; int main( ){ if( LT_KRN == LBase::LoadLibraries( LT_KRN, LT_DLGKRN)) cout << "success" << endl; L_TCHAR licenseFile[] = L"d:\\temp\\TestLic.lic"; L_TCHAR key[] = L"xyz123abc"; LSettings::SetLicenseFile( licenseFile, key); return 0; }
Ask leadtools support, but they don't have much experience with working with QT...
When I tries to build application I get following errors:
LNK2019: unresolved external symbol "__declspec(dllimport) public: static unsigned int __cdecl LBase::LoadLibraries(unsigned int,unsigned int)" (__imp_?LoadLibraries@LBase@@SAIII@Z) referenced in function main
LNK2019: unresolved external symbol "__declspec(dllimport) public: static int __cdecl LSettings::SetLicenseFile(wchar_t *,wchar_t *)" (__imp_?SetLicenseFile@LSettings@@SAHPEA_W0@Z) referenced in function main
For following methods documentation says that I only need one dll/lib package (ltkrn). How to fix it? Still I don't get differences between static and dynamic linkage and this could be the problem.