Re: [Openadaptxt-developers] Building and running OpenAdaptxt on Windows 7
Brought to you by:
keypoint,
openadaptxt
|
From: Vinay K. <vka...@ke...> - 2011-10-10 14:44:12
|
Hi Tim, Pls refer the below link https://sourceforge.net/projects/openadaptxt/files/Binaries/KPTFramework/ Download Framework_Windows_2.6.0.0.tar.gz<http://sourceforge.net/projects/openadaptxt/files/Binaries/KPTFramework/Framework_Windows_2.6.0.0.tar.gz/download> . ->This folder contain data folder which contains all dictionaries and context files and this needs to be set as your base path. -> Create a example console app and include all the .h files from inc folder in Framework_Windows_2.6.0.0.tar.gz<http://sourceforge.net/projects/openadaptxt/files/Binaries/KPTFramework/Framework_Windows_2.6.0.0.tar.gz/download>. ->Copy the pertaining libs(kptframeworkv2DMTd.lib) from api/lib/win32 to the libs folder in Framework_Windows_2.6.0.0.tar.gz<http://sourceforge.net/projects/openadaptxt/files/Binaries/KPTFramework/Framework_Windows_2.6.0.0.tar.gz/download> and include this libs directory in the example app properities->linker->Additional library directories. And also the add the lib name (kptframeworkv2DMTd.lib) in linker->Additonal dependencies. ->Copy the pertaining dll (kptframeworkv2DMTd..dll) to the debug folder of example app . The main could be like #include "stdafx.h" #include "kptapi_framework.h" int _tmain(int argc, _TCHAR* argv[]) { KPTResultT result; /* 1. Create the Framework */ const KPTSysCharT *pBasePath = _T("C:\\Framework_Windows_2.6.0.0\\Framework_Windows_2.6.0.0\\data\\base"); KPTInitT initItems[] = { { KPT_CC_FRAMEWORK, 0, KPT_INIT_FRAMEWORK_LOCKINGENABLED, (intptr_t) eKPTTrue }, { KPT_CC_FRAMEWORK, 0, KPT_INIT_FRAMEWORK_BASEPATH, (intptr_t) pBasePath }, }; KPTCreateParamsT createParams = { 0 }; createParams.initItems = initItems; createParams.initItemCount = sizeof(initItems) / sizeof(*initItems); result = KPTFwkCreate(&createParams); if (KPTRESULT_FAILED(result)) { return result; } } Other framework functions that needs to be used can grasped from the https://sourceforge.net/projects/openadaptxt/files/Documents/KPTFramework_ReferenceGuide/KPTFramework.chm. Regards, Vinay ________________________________ From: Tim Brogden [mailto:tcb...@gm...] Sent: Thursday, October 06, 2011 4:45 PM To: ope...@li... Subject: [Openadaptxt-developers] Building and running OpenAdaptxt on Windows 7 Hello, I'm interested in trying out OpenAdaptxt to add word prediction to an accessibility application I'm writing. Would you be able to give me a few pointers on how to get started? I'm using Visual C++ 2010 Express on Window 7. I made some partly successful attempts to get the code to build and run - here's what I tried: - Downloaded api, pal, testingTools and v2core code from SVN - Downloaded the Framework_Windows_2.6.0.0 project which contains a nice looking data/base folder - Followed the build procedures doc: (i) Built pal solution: 28 libs built successfully, DLLs failed but I guess I can do without them for now (ii) Built api solution: 8 libs built successfully, DLLs failed but I guess I can do without them for now - Created a C++ console app project containing the code from Example_KPTFwkCreate and including kpt*.h, referencing the lib files, and setting the KPT_LIBAPI_LIB preprocessor option (#define) - Implemented the "GetPathToFrameworkFiles" method in order to set the "base path" to the data/base folder as shown below (maybe wrong?) const KPTSysCharT* GetPathToFrameworkFiles() { return _T("C:\\Users\\Tim\\Documents\\Visual Studio 2010\\Projects\\OpenAdaptxtTest\\OpenAdaptxtTest\\Framework_Windows_2.6.0.0\\data\\base"); } Outcome: KPTFwkCreate returns the result severity 3 (error), component 25 (?), status code 34 (KPT_SC_OSERROR) Any ideas where I'm going wrong? Thanks in advance for any help you can offer. Tim |