peters / openalpr-windows

Build OpenALPR on Windows.
MIT License
51 stars 53 forks source link

compile fails on tesseract #3

Open steveeaton opened 9 years ago

steveeaton commented 9 years ago

In the c:\wbuild\openalpr\windows\tesseract-ocr\src directory there is a tesseract304.x64.support.diff file. It looks to me like the patch was bad or something.

I have tried x64, buildall, master, and v2.1.0 all the same

Msbuild: OutDir - C:\wbuild\openalpr\windows\build\artifacts\2.1.0\v120\Debug\WIN32\tesseract Msbuild: Matrix - Debug, WIN32, v120 Get-Content : Cannot find path 'C:\wbuild\openalpr\windows\tesseract-ocr\src\vs2010\libtesseract\libtesseract.vcxproj' because it does not exist. At C:\wbuild\openalpr\windows\build.ps1:258 char:16

peters commented 9 years ago

You are probably right about the patch being broken. It should work if you checkout master. I did a clean checkout a couple of days ago. I'd hold off with 3.04 since it requires openalpr training data to be retrained and there's also a bug in 3.04 causing less accurate OCR recognition results (2% worse on average).

steveeaton commented 9 years ago

I tried the following with the same result. I did not specifically target 3.04 or do anything with it, I am picking that up from one of the checkouts apparently. I just did it again to doublecheck

git clone https://github.com/openalpr/openalpr.git cd openalpr git clone https://github.com/peters/openalpr-windows.git windows git submodule update --init --recursive cd windows .\build.ps1 -Configuration Release -Platform x64 -PlatformToolset v120 -CudaGeneration None

steveeaton commented 9 years ago

By the way thanks for the amazing work. building openalpr was such a pain, I was getting ready to look at crosscompiling it. This really helps, and will help the project advance. Once I can get this to build, then I can start contributing, most likely in .NET, probably my first attempt will be to expose the character traits in .net

steveeaton commented 9 years ago

more info, I pulled down your 2.1.0 from a few days ago and got a similar error, but more detail

Time Elapsed 00:00:12.43

Applying patch: tesseract303.x64.support.diff

fatal: Not a git repository (or any of the parent directories): .git fatal: --index outside a repository

Msbuild: Project - C:\nbuild\openalpr-windows-2.1.0\tesseract-ocr\src\vs2010\libtesseract\libtesseract.vcxproj

Msbuild: OutDir - C:\nbuild\openalpr-windows-2.1.0\build\artifacts\2.1.0\v120\Release\x64\tesseract Msbuild: Matrix - Release, x64, v120

peters commented 9 years ago

Thank you for the detailed error report. Unfortunately I don't have time to look at this until next week since I have a deadline coming up shortly.

peters commented 9 years ago

@steveeaton I tried to reproduce the compile issue you are having. It compiled just fine for both v120 and v140. But what i did notice that you did not checkout branch v2.1.0.

Check that you are running a update to date git version, i'm running git version 1.9.5.github.0

Please create a new folder before you attempt these steps:

git clone https://github.com/openalpr/openalpr.git 
cd openalpr 
git clone https://github.com/peters/openalpr-windows.git windows 
git submodule update --init --recursive 
cd windows 

git checkout v2.1.0

.\build.ps1 -Configuration Release -Platform x64 -PlatformToolset v120 -CudaGeneration None

Elapsed: 00:09:13.1333212

steveeaton commented 9 years ago

I am not in any rush. The steps I posted above, are the steps from the openalpr-windows website.

I also did the exact same steps you posted above with the same results.

I will post some video later in the week.

peters commented 9 years ago

fatal: Not a git repository (or any of the parent directories): .git fatal: --index outside a repository

Git complains that about the tesseract directory not being a .git directory. This is why the patch is failing. So strange.

peters commented 9 years ago

What happens if you cd into tesseract-ocr\src and enter git status ?

steveeaton commented 9 years ago

on both versions it shows good

C:\xbuild\openalpr\windows [(v2.1.0)]> cd .\tesseract-ocr C:\xbuild\openalpr\windows\tesseract-ocr [(v2.1.0)]> git status HEAD detached at v2.1.0 nothing to commit, working directory clean C:\xbuild\openalpr\windows\tesseract-ocr [(v2.1.0)]>

steveeaton commented 9 years ago

I have other code I am working on this week, enjoy your week and I can work with you next week when you have time

steveeaton commented 9 years ago

ok back on it today. I am building on a 64bit MSI machine running windows 8.1.

C:\wbuild\openalpr\windows [(v2.1.0)]> git version git version 1.9.5.github.0

C:\wbuild> git clone https://github.com/openalpr/openalpr.git Cloning into 'openalpr'... remote: Counting objects: 5808, done. rRemote: Total 5808 (delta 0), reused 0 (delta 0), pack-reused 5808eceiving objects: 98% (5692/5808), 2.75 MiB | 1.33 M Receiving objects: 99% (5 Receiving objects: 100% (5808/5808), 3.15 MiB | 1.33 MiB/s, done. Resolving deltas: 100% (4104/4104), done. Checking connectivity... done. C:\wbuild> cd .\openalpr C:\wbuild\openalpr [master]> git clone https://github.com/peters/openalpr-windows.git windows Cloning into 'windows'... remote: Counting objects: 832, done. remote: Total 832 (delta 0), reused 0 (delta 0), pack-reused 832 Receiving objects: 100% (832/832), 3.14 MiB | 1.30 MiB/s, done. Resolving deltas: 100% (264/264), done. Checking connectivity... done. C:\wbuild\openalpr [master]> git submodule update --init --recursive C:\wbuild\openalpr [master]> cd windows C:\wbuild\openalpr\windows [master]> git checkout v2.1.0 Note: checking out 'v2.1.0'.

You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example:

git checkout -b new_branch_name

HEAD is now at 3644b5b... Update patch to support compiling tesseract using visual studio 2015. This is based on the v3. 04 tag: https://github.com/tesseract-ocr/tesseract/commit/97080412fdc8cef05b1f917e698277cd01c6f004 C:\wbuild\openalpr\windows [(v2.1.0)]>

then I executed .\build.ps1 -Configuration Release -Platform x64 -PlatformToolset v120 -CudaGeneration None

leptonica and all of those up to tesseract build. Looking in the tesseract-ocr\src directory there is just the diff file there so it blows up at that point

emrekenci commented 9 years ago

@peters I'm having the same issue with @steveeaton.

I cloned this repo into the folder "openalpr-windows-2.1.0\tesseract-ocr\src".

Then ran the build command again.

The build went past this error.

But It failed again with this error:

     Creating directory "x64\LIB_Release\".
 1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets(61,5): error MSB8013: This
    project doesn't contain the Configuration and Platform combination of LIB_Release|x64. [C:\Users\emrekenci\Desk
   top\openalpr-windows-2.1.0\openalpr-windows-2.1.0\tesseract-ocr\src\vs2010\libtesseract\libtesseract.vcxproj]

I'm investingating this.

peters commented 9 years ago

I'm sorry about the lack of feedback guys but I have a deadline until the end of the month.

@steveeaton

C:\wbuild\openalpr [master]> git submodule update --init --recursive C:\wbuild\openalpr [master]> cd windows C:\wbuild\openalpr\windows [master]> git checkout v2.1.0 Note: checking out 'v2.1.0'.

You must checkout v2.1.0 before you initialize the submodules.

@emrekenci

You cannot clone the tesseract repository directly you have to ensure that current HEAD points to SHA #449fc8a

steveeaton commented 9 years ago

ok so following your suggestions with your latest commands C:\wbuild> git version git version 1.9.5.github.0 C:\wbuild> git clone https://github.com/openalpr/openalpr.git Cloning into 'openalpr'... remote: Counting objects: 6216, done. remote: Compressing objects: 100% (6/6), done. remote: Total 6216 (delta 2), reused 0 (delta 0), pack-reused 6210 Receiving objects: 100% (6216/6216), 3.24 MiB | 1.51 MiB/s, done. Resolving deltas: 100% (4395/4395), done. Checking connectivity... done. C:\wbuild> cd .\openalpr C:\wbuild\openalpr [master]> git clone https://github.com/peters/openalpr-windows.git windows Cloning into 'windows'... remote: Counting objects: 834, done. remote: Total 834 (delta 0), reused 0 (delta 0), pack-reused 834 Receiving objects: 100% (834/834), 3.14 MiB | 1.31 MiB/s, done. Resolving deltas: 100% (267/267), done. Checking connectivity... done. C:\wbuild\openalpr [master]> git checkout v2.1.0 Note: checking out 'v2.1.0'.

You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example:

git checkout -b new_branch_name

HEAD is now at 61a77fa... Incremented version to 2.1.0 C:\wbuild\openalpr [(v2.1.0) +1 ~0 -0 !]> git submodule update --init --recursive C:\wbuild\openalpr [(v2.1.0) +1 ~0 -0 !]> cd windows C:\wbuild\openalpr\windows [v2.1.0]> .\build.ps1 -Configuration Release -Platform x64 -PlatformToolset v120 -CudaGenerat ion None

leptonica and all of those up to tesseract build. Looking in the tesseract-ocr\src directory there is just the diff file there so it blows up at that point still

juampitraver commented 9 years ago

@peters i have this error when compiling openalpr MSBUILD : error MSB1009: Project file does not exist. Switch: C:\Windows\system32\openalpr\windows\tesseract-ocr\dependencies\giflib\giflib.vcxproj

Die : C:\Program Files (x86)\MSBuild\12.0\Bin\msbuild.exe returned a non-zero exit code At C:\Windows\system32\openalpr\windows\build.ps1:194 char:9

the file exist in that location!

help please, thanks!

abusby commented 8 years ago

Just in case someone else comes across this and is having the same problem, which i also ran into this is the correct sequence of commands to get build to work.

git clone https://github.com/openalpr/openalpr.git cd openalpr git clone https://github.com/peters/openalpr-windows.git windows cd windows git checkout v2.1.0 git submodule update --init --recursive

This will download all of the correct files. The just run your desired build command

schallot commented 8 years ago

@abusby's comment helped me get closer, but now I get the following errors:

"C:\Workspace\openalpr\windows\build\artifacts\2.1.0\v120\Release\x64\openalpr\ALL_BUILD.vcxproj" (default target) (1)-> "C:\Workspace\openalpr\windows\build\artifacts\2.1.0\v120\Release\x64\openalpr\bindings\go\openalprgo.vcxproj" (default target) (15) -> (ClCompile target) -> C:\Workspace\openalpr\src\bindings\go\openalprgo.cpp(19): error C2375: 'AlprInit' : redefinition; different linkage [C:\Workspace\openalpr\windows\build\artifacts\2.1.0\v120\Release\x64\openalpr\bindings\go\openalprgo.vcxproj] C:\Workspace\openalpr\src\bindings\go\openalprgo.cpp(24): error C2375: 'SetDetectRegion' : redefinition; different linkage [C:\Workspace\openalpr\windows\build\artifacts\2.1.0\v120\Release\x64\openalpr\bindings\go\openalprgo.vcxproj] C:\Workspace\openalpr\src\bindings\go\openalprgo.cpp(29): error C2375: 'SetTopN' : redefinition; different linkage [C:\Workspace\openalpr\windows\build\artifacts\2.1.0\v120\Release\x64\openalpr\bindings\go\openalprgo.vcxproj] C:\Workspace\openalpr\src\bindings\go\openalprgo.cpp(34): error C2375: 'SetDefaultRegion' : redefinition; different linkage [C:\Workspace\openalpr\windows\build\artifacts\2.1.0\v120\Release\x64\openalpr\bindings\go\openalprgo.vcxproj] C:\Workspace\openalpr\src\bindings\go\openalprgo.cpp(39): error C2375: 'IsLoaded' : redefinition; different linkage [C:\Workspace\openalpr\windows\build\artifacts\2.1.0\v120\Release\x64\openalpr\bindings\go\openalprgo.vcxproj] C:\Workspace\openalpr\src\bindings\go\openalprgo.cpp(44): error C2375: 'Unload' : redefinition; different linkage [C:\Workspace\openalpr\windows\build\artifacts\2.1.0\v120\Release\x64\openalpr\bindings\go\openalprgo.vcxproj] C:\Workspace\openalpr\src\bindings\go\openalprgo.cpp(49): error C2375: 'RecognizeByFilePath' : redefinition; different linkage [C:\Workspace\openalpr\windows\build\artifacts\2.1.0\v120\Release\x64\openalpr\bindings\go\openalprgo.vcxproj] C:\Workspace\openalpr\src\bindings\go\openalprgo.cpp(59): error C2375: 'RecognizeByBlob' : redefinition; different linkage [C:\Workspace\openalpr\windows\build\artifacts\2.1.0\v120\Release\x64\openalpr\bindings\go\openalprgo.vcxproj] C:\Workspace\openalpr\src\bindings\go\openalprgo.cpp(70): error C2375: 'GetVersion' : redefinition; different linkage [C:\Workspace\openalpr\windows\build\artifacts\2.1.0\v120\Release\x64\openalpr\bindings\go\openalprgo.vcxproj]

Anyone else see this?

sompjang commented 8 years ago

I have same problem as @schallot. Did anyone resolve that?

sompjang commented 8 years ago

I solve this priblem by commenting these functions in openalprgo.cpp... but after that I have got another problem.

When I try to compile configuration for debug I get these errors:

openalpr-static.lib(alpr_impl.obj) : error LNK2019: unresolved external symbol "public: thiscall alpr::StateDetector::StateDetector(class std::basic_string<char,struct std::char_traits,class std::allocator >,class std::basic_string<char,struct std::char_traits,class td::allocator >,class std::basic_string<char,struct std::char_traits,class std::allocator >)" (??0StateDetector@alpr@@QAE@V?$basic_string@DU?char_traits@D@std@@V?$allocator@D@2@@std@@00@Z) referenced in function "public: thiscall alpr::AlprImpl::AlprImpl(class std::basic_string<char,struct std::char_traits,class std::allocator >,class std::basic_string<char,struct std::char_traits,class std::allocator >,class std::basic_string<char,struct std::char_traits,class std::allocator >)" (??0AlprImpl@alpr@@QAE@V?$basic_string@DU?char_traits@D@std@@V?$allocator@D@2@@std@@00@Z) [E:\skola\openalpr\windows\build\artifacts\2.2.0\v140\Debug\win32\openalpr\misc_utilities\openalpr-utils-binarizefontsheet.vcxproj]

Can anyone help?

tek-noid commented 8 years ago

For this to compile, I used the proper build instructions here For the "redefinition" errors, I made these changes in openalpr\src\bindings\go\openalprgo.h

#ifdef __cplusplus
extern "C" {
#endif

#if !defined(OPENALPR_EXPORT)
#define OPENALPR_EXPORT
#endif

    typedef void* Alpr;

    OPENALPR_EXPORT Alpr AlprInit(char* country, char* configFile, char* runtimeDir);
    OPENALPR_EXPORT void SetDetectRegion(Alpr alpr, int detectRegion);
    OPENALPR_EXPORT void SetTopN(Alpr alpr, int topN);
    OPENALPR_EXPORT void SetDefaultRegion(Alpr alpr, char* region);
    OPENALPR_EXPORT int IsLoaded(Alpr alpr);
    OPENALPR_EXPORT void Unload(Alpr alpr);
    OPENALPR_EXPORT char* RecognizeByFilePath(Alpr alpr, char* filePath);
    OPENALPR_EXPORT char* RecognizeByBlob(Alpr alpr, char* imageBytes, int len);
    OPENALPR_EXPORT char* GetVersion();
#ifdef __cplusplus
}
#endif

and in openalpr\src\bindings\go\openalprgo.cpp I moved the include of the above header after the definition of OPENALPLR_EXPORT, ala

#include <alpr.h>
// Remove header from here
extern "C" {

#if defined(_MSC_VER)
    //  Microsoft
#define OPENALPR_EXPORT __declspec(dllexport)
#else
    //  do nothing
#define OPENALPR_EXPORT
#endif

#include "openalprgo.h"

And Finally, to address the wrong Libraries being referenced during the LInk phase, in Build.ps1, I made this change in the Copy-Sources function

        Vcxproj-Set $VcxProjectFilename '/rs:Project/rs:PropertyGroup[@Label="Globals"]/rs:OpenALPRVersion' $OpenALPRVersion
        Vcxproj-Set $VcxProjectFilename '/rs:Project/rs:PropertyGroup[@Label="Globals"]/rs:TesseractVersion' $TesseractVersion`

After this, I was able to successfully process one image. The next image throws an error, so I need to figure that out.

Caught exception in OpenALPR recognize: C:\inhouse\openalpr\windows\opencv\modules\core\src\ocl.cpp:5118: error: (-215)
clEnqueueWriteBuffer(q, (cl_mem)u->handle, CL_TRUE, dstrawofs, total, alignedPtr.getAlignedPtr(), 0, 0, 0) >= 0 in function cv::ocl::OpenCLAllocator::upload
shamsuddinladha commented 8 years ago

I did what @tek-noid suggested. In addition

astrung commented 8 years ago

File openalpr.conf.in has been renamed by : this commit.Please update file name in build.ps1

benchat commented 6 years ago

I'm getting this errors: Kindly someone help

"C:\Users\benchat\Desktop\buildone\openalpr\windows\build\artifacts\2.2.0\v120\Release\Win32\openalpr\ALL_BUILD.vcxproj" (default target) (1) -> "C:\Users\benchat\Desktop\buildone\openalpr\windows\build\artifacts\2.2.0\v120\Release\Win32\openalpr\alpr.vcxproj" (default target) (3) -> "C:\Users\benchat\Desktop\buildone\openalpr\windows\build\artifacts\2.2.0\v120\Release\Win32\openalpr\openalpr\openalpr-static.vcxproj" (default target) (4) -> (ClCompile target) -> C:\Users\benchat\Desktop\buildone\openalpr\src\openalpr\alpr_c.cpp(27): error C2375: 'openalpr_init' : redefinition; different linkage [C:\Users\benchat\Desktop\buildone\openalpr\windows\build\artifacts\2.2.0\v120\Release\Win32\openalpr\o penalpr\openalpr-static.vcxproj] C:\Users\benchat\Desktop\buildone\openalpr\src\openalpr\alpr_c.cpp(34): error C2375: 'openalpr_is_loaded' : redefinition; different linkage [C:\Users\benchat\Desktop\buildone\openalpr\windows\build\artifacts\2.2.0\v120\Release\Win32\opena lpr\openalpr\openalpr-static.vcxproj] C:\Users\benchat\Desktop\buildone\openalpr\src\openalpr\alpr_c.cpp(40): error C2375: 'openalpr_set_country' : redefinition; different linkage [C:\Users\benchat\Desktop\buildone\openalpr\windows\build\artifacts\2.2.0\v120\Release\Win32\ope nalpr\openalpr\openalpr-static.vcxproj] C:\Users\benchat\Desktop\buildone\openalpr\src\openalpr\alpr_c.cpp(46): error C2375: 'openalpr_set_prewarp' : redefinition; different linkage [C:\Users\benchat\Desktop\buildone\openalpr\windows\build\artifacts\2.2.0\v120\Release\Win32\ope nalpr\openalpr\openalpr-static.vcxproj] C:\Users\benchat\Desktop\buildone\openalpr\src\openalpr\alpr_c.cpp(52): error C2375: 'openalpr_set_mask' : redefinition; different linkage [C:\Users\benchat\Desktop\buildone\openalpr\windows\build\artifacts\2.2.0\v120\Release\Win32\openal pr\openalpr\openalpr-static.vcxproj] C:\Users\benchat\Desktop\buildone\openalpr\src\openalpr\alpr_c.cpp(58): error C2375: 'openalpr_set_detect_region' : redefinition; different linkage [C:\Users\benchat\Desktop\buildone\openalpr\windows\build\artifacts\2.2.0\v120\Release\Win 32\openalpr\openalpr\openalpr-static.vcxproj] C:\Users\benchat\Desktop\buildone\openalpr\src\openalpr\alpr_c.cpp(63): error C2375: 'openalpr_set_topn' : redefinition; different linkage [C:\Users\benchat\Desktop\buildone\openalpr\windows\build\artifacts\2.2.0\v120\Release\Win32\openal pr\openalpr\openalpr-static.vcxproj] C:\Users\benchat\Desktop\buildone\openalpr\src\openalpr\alpr_c.cpp(68): error C2375: 'openalpr_set_default_region' : redefinition; different linkage [C:\Users\benchat\Desktop\buildone\openalpr\windows\build\artifacts\2.2.0\v120\Release\Wi n32\openalpr\openalpr\openalpr-static.vcxproj] C:\Users\benchat\Desktop\buildone\openalpr\src\openalpr\alpr_c.cpp(77): error C2375: 'openalpr_recognize_rawimage' : redefinition; different linkage [C:\Users\benchat\Desktop\buildone\openalpr\windows\build\artifacts\2.2.0\v120\Release\Wi n32\openalpr\openalpr\openalpr-static.vcxproj] C:\Users\benchat\Desktop\buildone\openalpr\src\openalpr\alpr_c.cpp(92): error C2375: 'openalpr_recognize_encodedimage' : redefinition; different linkage [C:\Users\benchat\Desktop\buildone\openalpr\windows\build\artifacts\2.2.0\v120\Releas e\Win32\openalpr\openalpr\openalpr-static.vcxproj] C:\Users\benchat\Desktop\buildone\openalpr\src\openalpr\alpr_c.cpp(110): error C2375: 'openalpr_free_response_string' : redefinition; different linkage [C:\Users\benchat\Desktop\buildone\openalpr\windows\build\artifacts\2.2.0\v120\Release \Win32\openalpr\openalpr\openalpr-static.vcxproj] C:\Users\benchat\Desktop\buildone\openalpr\src\openalpr\alpr_c.cpp(115): error C2375: 'openalpr_cleanup' : redefinition; different linkage [C:\Users\benchat\Desktop\buildone\openalpr\windows\build\artifacts\2.2.0\v120\Release\Win32\openal pr\openalpr\openalpr-static.vcxproj]

"C:\Users\benchat\Desktop\buildone\openalpr\windows\build\artifacts\2.2.0\v120\Release\Win32\openalpr\ALL_BUILD.vcxproj" (default target) (1) -> "C:\Users\benchat\Desktop\buildone\openalpr\windows\build\artifacts\2.2.0\v120\Release\Win32\openalpr\alpr.vcxproj" (default target) (3) -> "C:\Users\benchat\Desktop\buildone\openalpr\windows\build\artifacts\2.2.0\v120\Release\Win32\openalpr\openalpr\support\support.vcxproj" (default target) (5) -> C:\Users\benchat\Desktop\buildone\openalpr\src\openalpr\support\filesystem.cpp(165): error C2079: 'pathstream' uses undefined class 'std::basic_stringstream<char,std::char_traits,std::allocator>' [C:\Users\benchat\Desktop\buil done\openalpr\windows\build\artifacts\2.2.0\v120\Release\Win32\openalpr\openalpr\support\support.vcxproj] C:\Users\benchat\Desktop\buildone\openalpr\src\openalpr\support\filesystem.cpp(166): error C2297: '<<' : illegal, right operand has type 'const char [7]' [C:\Users\benchat\Desktop\buildone\openalpr\windows\build\artifacts\2.2.0\v120\Relea se\Win32\openalpr\openalpr\support\support.vcxproj] C:\Users\benchat\Desktop\buildone\openalpr\src\openalpr\support\filesystem.cpp(166): error C2297: '<<' : illegal, right operand has type 'const char *' [C:\Users\benchat\Desktop\buildone\openalpr\windows\build\artifacts\2.2.0\v120\Release \Win32\openalpr\openalpr\support\support.vcxproj] C:\Users\benchat\Desktop\buildone\openalpr\src\openalpr\support\filesystem.cpp(167): error C2228: left of '.str' must have class/struct/union [C:\Users\benchat\Desktop\buildone\openalpr\windows\build\artifacts\2.2.0\v120\Release\Win32\ope nalpr\openalpr\support\support.vcxproj]

322 Warning(s)
16 Error(s)

Time Elapsed 00:01:31.46

Die : cmake.exe returned a non-zero exit code At C:\Users\benchat\Desktop\buildone\openalpr\windows\build.ps1:194 char:9

peterPP1 commented 5 years ago

Same issue here :(

log.log

igitur commented 5 years ago

C:\Users\benchat\Desktop\buildone\openalpr\src\openalpr\alpr_c.cpp(27): error C2375: 'openalpr_init' : redefinition; different linkage

I noticed the if you checkout the v2.2.0 tag of https://github.com/openalpr/openalpr then the build succeeds. So the above compiler error was caused by a commit subsequent to the v2.2.0 release of OpenALPR.

igitur commented 5 years ago

To checkout v2.2.0, do this in your openalpr directory (not in the windows subdirectory)

git checkout tags/v2.2.0 -b v2.2.0