41 lines
2.9 KiB
Plaintext
41 lines
2.9 KiB
Plaintext
Automation1 C API
|
|
=============================================
|
|
|
|
The Automation1 C API comes as both a dynamic library for 32-bit and 64-bit Windows as well as a shared object for 64-bit Linux.
|
|
These are found under the "Library/Windows/x86", "Library/Windows/x64" and "Library/Linux/x64" folders respectively. Each folder
|
|
contains all the library files required to build and run an application. You can find all headers located under the "Include" folder.
|
|
|
|
You can find project settings and code examples on how to use the C API under the "Examples/C" folder. The examples in that directory
|
|
are for Windows only but the source code will be similar on Linux. To run the examples, you will have to manually copy the binaries
|
|
found under "Library/Windows/x64" to the example's output directory.
|
|
|
|
To use the Automation1 C API on Windows:
|
|
-------------------------------------------------------------
|
|
The C API for Windows supports both 32-bit and 64-bit Windows.
|
|
|
|
1. Create a new Visual Studio C or C++ project.
|
|
2. Update your Visual Studio project with the following:
|
|
* Add "Automation1.h" as an include to your project.
|
|
* Link to "Automation1C.lib" if your project is 32-bit or "Automation1C64.lib" if your project is 64-bit.
|
|
3. Copy the following files to your output directory:
|
|
* Copy "Automation1C.dll" if your project is 32-bit or "Automation1C64.dll" if your project is 64-bit.
|
|
* Copy "Automation1Compiler.dll" if your project is 32-bit or "Automation1Compiler64.dll" if your project is 64-bit.
|
|
4. Include "Automation1.h" at the top of any source file where you plan to use the controller.
|
|
5. Connect to the controller using one of the Automation1_Connect() functions.
|
|
* You must disconnect from the controller when you are done using it. Failing to do so will result in a memory leak.
|
|
* See the Automation1_Disconnect() function for how to disconnect the controller.
|
|
|
|
To use the Automation1 C API on Linux:
|
|
-------------------------------------------------------------
|
|
The C API for Linux supports Debian 10.x. Any Linux distribution that has GCC 8.3.0, GLIBC 2.28, GLIBCXX 3.4.25, libsodium 1.0.17,
|
|
or newer versions, may work.
|
|
|
|
1. Add all headers under "Include" to your project.
|
|
2. Link your project to "libautomation1c.so".
|
|
3. Include "Automation1.h" at the top of any source file where you plan to use the controller.
|
|
4. Connect to the controller using one of the Automation1_Connect() functions.
|
|
* You must disconnect from the controller when you are done using it. Failing to do so will result in a memory leak.
|
|
* See the Automation1_Disconnect() function for how to disconnect the controller.
|
|
5. To run your application on Linux, you'll need to place all shared objects under "Library/Linux/x64" onto the Linux machine
|
|
and configure the LD_LIBRARY_PATH to point to that location.
|