Company X Accessories C1030-5510 Electronic Keyboard User Manual


 
Use APIs in own projects
C++ API
Include file: udkapi.h
Library file:
Windows: udkapi_vc[ver]_[arch].lib, [ver] is 8, 9, 10, [arch] is x86 or amd64, resides in
lib/[build]/
Linux: libusbapi.so, resides in lib/
Namespace: ceUDK
As this API uses exceptions for error handling, it is really important to use the same
compiler and build settings which are used to build the API itself. Otherwise exception
based stack unwinding may cause undefined side effects which are really hard to fix.
Add project to UDK build
A simple example would be the following. Let's assume there's a source file
mytest/mytest.cpp inside UDK's root installation. To build a mytestexe executable with UDK
components, those lines must be appended:
add_executable(mytestexe mytest/mytest.cpp)
target_link_libraries(mytestexe ${UDKAPI_LIBNAME})
Rebuilding the UDK with these entries in Visual Studio will create a new project inside the
solution (and request a solution reload). On Linux, calling make will just include mytestexe
into the build process.
C API
Include file: udkapic.h
Library file:
Windows: udkapic_vc[ver]_[arch].lib, [ver] is 8, 9, 10, [arch] is x86 or amd64, resides in
lib/[build]/
Linux: libusbapic.so, resides in lib/
Namespace: Not applicable
The C API offers all functions from a dynamic link library (Windows: .dll, Linux: .so) and
uses standardized data types only, so it is usable in a wide range of environments.
Adding it to the UDK build process is nearly identical to the C++ API description, except
that ${UDKAPIC_LIBNAME} must be used.
USBS6 / C1030-5510 http://www.cesys.com/
User Doc V0.3 -37- preliminary