twelve17 / openalpr-ios

Xcode Framework for the openalpr library
GNU General Public License v3.0
116 stars 35 forks source link

How to use static library #1

Closed fibnochi closed 8 years ago

fibnochi commented 9 years ago

I have created openalpr-xcode.a static library following given instruct. I have also imported library into my project but when I try to include alp.h in my project I receive warning saying there is no such file.

twelve17 commented 9 years ago

What do you have set for the header search paths?

fibnochi commented 9 years ago

Actually issue is static library was being built for device not for simulator and it was causing error. When I build my project for device it was working fine.

I have resolved all the issue but do not know how to use it in my project as there is no documentation. If you can provide me some documentation about library usage or just tell me how to use it in mobile that will be grate help. Because when I run the project i get openalpr.conf file not found at /etc/openalpr/openalpr.conf.

twelve17 commented 9 years ago

You need to import the openalpr.conf file as a resource in your project (do not copy as a reference, have it copy to your project). Once there, you can pass the Alpr constructor the path to the file.

fibnochi commented 9 years ago

Can you please tell me where is openalpr.conf file. I have copied and changed extension of openalpr.conf.in in config folder. Is this is the file I should use?

fibnochi commented 9 years ago

It will be nice if you can post complete way of calling alpr library. I mean some documentation will be nice.

twelve17 commented 9 years ago

Nah, that is a template file. You need to compile openalpr first, which will create the openalpr.conf file (without the .in), which you can then add to your project.

twelve17 commented 9 years ago

I'm not part of the openalpr project. I am a developer just like you who wants to use the openalpr library. I would like to add more documentation at some point, but, as you have seen, there is little out there, so I'm figuring out as I go. I am still working on a project that I have to complete first, so this, unfortunately, has to wait.

twelve17 commented 9 years ago

The openalpr project has a complete way to call the library. Have you taken a look at it?

fibnochi commented 9 years ago

Does not your code compile alpr and generate .conf file? If not then do tell me how to get .conf file.

I have checked and followed main.cpp code to call alpr library but it gives me error openalpr.conf missing.

twelve17 commented 9 years ago

I compiled the code per the openalpr instructions. I believe that created a openalpr.conf file in the $(installation prefix)/etc. I then imported that file into my Xcode project. Because the file is no longer in the default location, you will need to tell Alpr the new location, which is now a resource bundle in your app. You will need to pass this path to the alpr constructor.

fibnochi commented 9 years ago

I have followed your instructions to compile but no .conf file is generated. If you can share your file that will be nice.

twelve17 commented 9 years ago

I believe it's better for you to understand how to get the file yourself. If you compile openalpr per their instructions, the file should exist at src/config/openalpr.conf after the make step. I believe I used the steps in the hard way for Linux, which work for Mac OS X too. Can you try with that procedure?

twelve17 commented 8 years ago

For v2 of this project, I have replaced the old instructions and bash scripts with a Ruby script to build the OpenALPR and dependency Frameworks, as well as the OpenALPR Xcode project. A sample app is included. These changes have been pushed to the master branch, and the old version has been moved to branch 1_0. Feel free to check out this new script and see if it works for you. I will no longer be working on or supporting the 1_0 codebase.