mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +03:00
building.md: Adding doc on building a simple example with g++ and using pkg-config
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
parent
22ad93956c
commit
d2e2682f0e
@ -40,3 +40,20 @@ naming.
|
|||||||
~~~~~~~~~~~~~
|
~~~~~~~~~~~~~
|
||||||
make _pyupm_i2clcd
|
make _pyupm_i2clcd
|
||||||
~~~~~~~~~~~~~
|
~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Sometimes you want to build a small C++ example against an installed library.
|
||||||
|
This is fairly easy if installed systemwide. Just link against the correct
|
||||||
|
librar (in this case libupm-tm1637) and then add /usr/include/upm to the loader
|
||||||
|
path:
|
||||||
|
|
||||||
|
~~~~~~~~~~~~
|
||||||
|
g++ test.cxx -lupm_tm1637 -I/usr/include/upm
|
||||||
|
~~~~~~~~~~~~
|
||||||
|
|
||||||
|
You can also use pkg-config to return the information to you, which is
|
||||||
|
considered the correct way if including UPM in a build system like cmake or
|
||||||
|
autotools on linux.
|
||||||
|
|
||||||
|
~~~~~~~~~~~
|
||||||
|
pkg-config --cflags --libs upm-tm1637
|
||||||
|
~~~~~~~~~~~
|
||||||
|
Loading…
x
Reference in New Issue
Block a user