Then, for you project to build correctly, you need to link with your project the Yoctopuce library and
the prerequisite system libraries:
• For Windows:
yocto-static.lib
• For Mac OS X:
libyocto-static.a
,
IOKit.framework
, and
CoreFoundation.framework
• For Linux:
libyocto-static.a
,
libm
,
libpthread
,
libusb1.0
, and
+
.
Note, under Linux, if you wish to compile in command line with GCC, it is generally advisable to link
system libraries as dynamic libraries, rather than as static ones. To mix static and dynamic libraries
on the same command line, you must pass the following arguments:
gcc (...) -Wl,-Bstatic -lyocto-static -Wl,-Bdynamic -lm -lpthread -lusb-1.0 -lstdc++
Integration as a dynamic library
Integration of the Yoctopuce library as a dynamic library allows you to produce an executable smaller
than with the two previous methods, and to possibly update this library, if a patch reveals itself
necessary, without needing to recompile the source code of the application. On the other hand, it is
an integration mode which systematically requires you to copy the dynamic library on the target
machine where the application will run (
yocto.dll
for Windows,
libyocto.so.1.0.1
for Mac OS X and
Linux).
To integrate the dynamic Yoctopuce library to your project, you must include the
Sources
directory
of the Yoctopuce library into your
IncludePath
, and add the sub-directory
Binaries/...
corresponding to your operating system into your
LibPath
.
Then, for you project to build correctly, you need to link with your project the dynamic Yoctopuce
library and the prerequisite system libraries:
• For Windows:
yocto.lib
• For Mac OS X:
libyocto
,
IOKit.framework
, and
CoreFoundation.framework
• For Linux:
libyocto
,
libm
,
libpthread
,
libusb1.0
, and
+
.
With GCC, the command line to compile is simply:
gcc (...) -lyocto -lm -lpthread -lusb-1.0 -lstdc++
11. Using Yocto-Display with C++
64
www.yoctopuce.com
Содержание Yocto-Display
Страница 1: ...Yocto Display User Manual...
Страница 2: ......
Страница 40: ...34 www yoctopuce com...
Страница 52: ...46 www yoctopuce com...
Страница 84: ...78 www yoctopuce com...
Страница 92: ...86 www yoctopuce com...
Страница 130: ...124 www yoctopuce com...
Страница 158: ...22 High level API Reference 152 www yoctopuce com On failure throws an exception or returns a negative error code...
Страница 422: ...416 www yoctopuce com...
Страница 424: ...24 Characteristics 418 www yoctopuce com...