Adaptive Vision Library is designed to be used as a part of C++ projects developed with Microsoft Visual Studio in versions 2010-2015.
Creating a New Project
Microsoft Visual Studio 2010
Adaptive Vision Library is provided with a wizard that creates and configures a project for using Adaptive Vision Library. To use the wizard, start Microsoft Visual Studio and choose the File | New | Project... command. The wizard called AVLProject is available at Installed Templates | Visual C++ | AVL. Enter the name for your project and click OK. An empty project configured for using Adaptive Vision Library will be created.
Microsoft Visual Studio 2012, 2013 and 2015
A project template similar to the wizard available for Visual Studio 2010 is available also for the newer versions. To create a new project using Adaptive Vision Library, start Microsoft Visual Studio and choose the File | New | Project... command. The template called AVLProject is available in the tab Installed | Templates | Other Languages | Visual C++.
Required Project Settings
All projects that use Adaptive Vision Library need some specific values of the compiler and linker settings. If you want to use the Library in your existing project or you are manually configuring a new project, please apply the settings listed below:
- Configuration Properties | General
- Character Set should be set to Use Unicode Character Set.
- Configuration Properties | C/C++
- Additional Include Directories should contain the $(AVL_PATH48)\include\ path.
- Configuration Properties | Linker
- Additional Library Directories should contain the proper path to directory containing the AVL.lib file. The proper path is $(AVL_PATH48)\lib\$(PlatformName)\.
- Additional Dependencies should contain AVL.lib file.
- Configuration Properties | Build Events
- Post-Build Event
- Command Line should contain copy "$(AVL_PATH48)\bin\$(PlatformName)\AVL.dll" "$(OutDir)" call. This setting is not mandatory, but the application using Adaptive Vision Library requires an access to the AVL.dll file and this is the easiest way to fulfill this requirement.
- Post-Build Event
Every source code file that uses Adaptive Vision Library needs the #include <AVL.h> directive. A proper path to the AVL.h file is set in the settings of the compiler (described above), so there is no need to use the full path in the directive.
Distributing Adaptive Vision Library with Your Application
Once the application is ready, it is time for preparing a distribution package or an installer. There are two requirements that needs to be fulfilled:
- The final executable file of the application needs to have access to the proper version (used by Win32 or x64 configuration) of the AVL.dll file. Typically, the AVL.dll file should be placed in the same directory as the executable.
- The computer that the application will run on needs a valid license for the use of Adaptive Vision Library product. Licenses can be managed with the License Manager application, that is installed with Adaptive Vision Library Runtime package.
- A license file (*.key) can be also manually copied to the end user's machine without installing Adaptive Vision Library Runtime. It must be placed in a subdirectory of the AppData system folder. The typical location for the license file is C:\Users\<UserName>\AppData\Local\Adaptive Vision\Licenses. Remember that the license is valid per machine, so every computer that runs the application needs a separate license file.
|Previous: SDK Installation||Next: Using Library on Linux|