iMicknl / cordova-plugin-openalpr

This Cordova plugin adds support for the OpenALPR (Automatic License Plate Recognition) library, which provides support for retrieving the license plate from a picture.
MIT License
33 stars 23 forks source link

opencv2/highgui/highgui.hpp' file not found #12

Closed olivero86 closed 6 years ago

olivero86 commented 7 years ago

When I run ionic build ios I get the following error message:

/Plugins/cordova-plugin-openalpr/PlateScanner.h:12:10: fatal error: 'opencv2/highgui/highgui.hpp' file not found                 
#include "opencv2/highgui/highgui.hpp"  

Thanks

iMicknl commented 7 years ago

Can you provide us with some more details? Please open the project in xCode and try to compile and run it. This can be an issue with the code signing / project settings in xCode. (cc @m3lv1n)

olivero86 commented 7 years ago

I fixed some project settings but still cannot run it. Below is the error I now get in XCode 8.2.1. When I run the ionic build, I get the following error: ` BUILD FAILED

The following build commands failed:
CompileC build/openalpr1.build/Debug-iphonesimulator/openalpr1.build/Objects-normal/i386/OpenALPR.o i386 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/oli/Sites/Demo/openalpr1/platforms ,ARCHS=i386,-target,openalpr1,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATIO d/emulator,SHARED_PRECOMPS_DIR=/Users/oli/Sites/Demo/openalpr1/platforms/ios/build/sharedpch
` And when I try to run the generated project I get this error in Xcode:

bildschirmfoto 2017-02-17 um 09 28 43
melvinversluijs commented 7 years ago

Hi @olivero86,

Ive managed to reproduce your error. For some reason the opencv framework is not added correctly to the project. We do not know yet if this is because of a directory structure error or a configuration error.

In the meantime you can bypass this error by moving the contents of the opencv2.framework/versions/A folder up to the opencv2.framework/ folder (like the image below) afterwards it is safe to delete the now empty versions folder.

screen shot 2017-02-21 at 22 35 44

Now build the project again.

We do not know yet when we will release a final fix since we are both busy graduating at the moment.

Kind regards, Melvin

iMicknl commented 6 years ago

(added as known Cordova issue to the readme, closing issue as this isn't something that is project specific)

tomevs88 commented 6 years ago

Any updates on this being fixed? I am currently running our own build for openAlpr but would like to use a recommended plugin. Thanks

iMicknl commented 6 years ago

Please have a look at the README. This is still a known issue which isn't related to our plugin, but to Cordova. We provide a work-around in the readme. @tomevs88

tomevs88 commented 6 years ago

@iMicknl Thanks for the reply.