{"action":"created","issue":{"url":"https://api.github.com/repos/peters/openalpr-windows/issues/3","labels_url":"https://api.github.com/repos/peters/openalpr-windows/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/peters/openalpr-windows/issues/3/comments","events_url":"https://api.github.com/repos/peters/openalpr-windows/issues/3/events","html_url":"https://github.com/peters/openalpr-windows/issues/3","id":96028290,"number":3,"title":"compile fails on tesseract","user":{"login":"steveeaton","id":6578208,"avatar_url":"https://avatars.githubusercontent.com/u/6578208?v=3","gravatar_id":"","url":"https://api.github.com/users/steveeaton","html_url":"https://github.com/steveeaton","followers_url":"https://api.github.com/users/steveeaton/followers","following_url":"https://api.github.com/users/steveeaton/following{/other_user}","gists_url":"https://api.github.com/users/steveeaton/gists{/gist_id}","starred_url":"https://api.github.com/users/steveeaton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveeaton/subscriptions","organizations_url":"https://api.github.com/users/steveeaton/orgs","repos_url":"https://api.github.com/users/steveeaton/repos","events_url":"https://api.github.com/users/steveeaton/events{/privacy}","received_events_url":"https://api.github.com/users/steveeaton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":20,"created_at":"2015-07-20T09:56:07Z","updated_at":"2016-02-02T15:39:55Z","closed_at":null,"body":"In the c:\\wbuild\\openalpr\\windows\\tesseract-ocr\\src directory there is a \r\ntesseract304.x64.support.diff file.   It looks to me like the patch was bad or something.\r\n\r\nI have tried x64, buildall, master, and v2.1.0  all the same\r\n\r\nMsbuild: OutDir - C:\\wbuild\\openalpr\\windows\\build\\artifacts\\2.1.0\\v120\\Debug\\WIN32\\tesseract\r\nMsbuild: Matrix - Debug, WIN32, v120\r\nGet-Content : Cannot find path 'C:\\wbuild\\openalpr\\windows\\tesseract-ocr\\src\\vs2010\\libtesseract\\libtesseract.vcxproj'\r\nbecause it does not exist.\r\nAt C:\\wbuild\\openalpr\\windows\\build.ps1:258 char:16\r\n+     $Content = Get-Content $Project\r\n+                ~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : ObjectNotFound: (C:\\wbuild\\opena...sseract.vcxproj:String) [Get-Content], ItemNotFoundEx\r\n   ception\r\n    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand\r\n"},"comment":{"url":"https://api.github.com/repos/peters/openalpr-windows/issues/comments/178642806","html_url":"https://github.com/peters/openalpr-windows/issues/3#issuecomment-178642806","issue_url":"https://api.github.com/repos/peters/openalpr-windows/issues/3","id":178642806,"user":{"login":"tek-noid","id":1024046,"avatar_url":"https://avatars.githubusercontent.com/u/1024046?v=3","gravatar_id":"","url":"https://api.github.com/users/tek-noid","html_url":"https://github.com/tek-noid","followers_url":"https://api.github.com/users/tek-noid/followers","following_url":"https://api.github.com/users/tek-noid/following{/other_user}","gists_url":"https://api.github.com/users/tek-noid/gists{/gist_id}","starred_url":"https://api.github.com/users/tek-noid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tek-noid/subscriptions","organizations_url":"https://api.github.com/users/tek-noid/orgs","repos_url":"https://api.github.com/users/tek-noid/repos","events_url":"https://api.github.com/users/tek-noid/events{/privacy}","received_events_url":"https://api.github.com/users/tek-noid/received_events","type":"User","site_admin":false},"created_at":"2016-02-02T15:39:55Z","updated_at":"2016-02-02T15:39:55Z","body":"For this to compile, I used the proper build instructions [here](https://github.com/peters/openalpr-windows/issues/6)\r\nFor the \"redefinition\" errors, I made these changes in openalpr\\src\\bindings\\go\\openalprgo.h\r\n```C++\r\n#ifdef __cplusplus\r\nextern \"C\" {\r\n#endif\r\n\r\n#if !defined(OPENALPR_EXPORT)\r\n#define OPENALPR_EXPORT\r\n#endif\r\n\r\n    typedef void* Alpr;\r\n\r\n\tOPENALPR_EXPORT Alpr AlprInit(char* country, char* configFile, char* runtimeDir);\r\n\tOPENALPR_EXPORT void SetDetectRegion(Alpr alpr, int detectRegion);\r\n\tOPENALPR_EXPORT void SetTopN(Alpr alpr, int topN);\r\n\tOPENALPR_EXPORT void SetDefaultRegion(Alpr alpr, char* region);\r\n\tOPENALPR_EXPORT int IsLoaded(Alpr alpr);\r\n\tOPENALPR_EXPORT void Unload(Alpr alpr);\r\n\tOPENALPR_EXPORT char* RecognizeByFilePath(Alpr alpr, char* filePath);\r\n\tOPENALPR_EXPORT char* RecognizeByBlob(Alpr alpr, char* imageBytes, int len);\r\n\tOPENALPR_EXPORT char* GetVersion();\r\n#ifdef __cplusplus\r\n}\r\n#endif\r\n```\r\nand in openalpr\\src\\bindings\\go\\openalprgo.cpp I moved the include of the above header *after* the definition of OPENALPLR_EXPORT, ala\r\n```C++\r\n#include <alpr.h>\r\n// Remove header from here\r\nextern \"C\" {\r\n\r\n#if defined(_MSC_VER)\r\n    //  Microsoft\r\n#define OPENALPR_EXPORT __declspec(dllexport)\r\n#else\r\n    //  do nothing\r\n#define OPENALPR_EXPORT\r\n#endif\r\n\r\n#include \"openalprgo.h\"\r\n```\r\n\r\nAnd Finally, to address the wrong Libraries being referenced during the LInk phase,  in Build.ps1, I made this change in the Copy-Sources function\r\n```ps1\r\n\t\tVcxproj-Set $VcxProjectFilename '/rs:Project/rs:PropertyGroup[@Label=\"Globals\"]/rs:OpenALPRVersion' $OpenALPRVersion\r\n\t\tVcxproj-Set $VcxProjectFilename '/rs:Project/rs:PropertyGroup[@Label=\"Globals\"]/rs:TesseractVersion' $TesseractVersion`\r\n```\r\n\r\nAfter this, I was able to successfully process one image.  The next image throws an error, so I need to figure that out.\r\n```\r\nCaught exception in OpenALPR recognize: C:\\inhouse\\openalpr\\windows\\opencv\\modules\\core\\src\\ocl.cpp:5118: error: (-215)\r\nclEnqueueWriteBuffer(q, (cl_mem)u->handle, CL_TRUE, dstrawofs, total, alignedPtr.getAlignedPtr(), 0, 0, 0) >= 0 in function cv::ocl::OpenCLAllocator::upload\r\n```"}}