Personal tools

Log in

Changes

From IGEP - ISEE Wiki

Jump to: navigation, search

How to use GPIOs

514 bytes added, 15:29, 9 January 2012
no edit summary
Go to:$/svn.hylands.org/linux/gpio/lib/. libgpio.so will be found here.
You must tell to SO where the dynamic If a program is link with dinamic libraries are, Linux kernel find this ones in a specific paths when program is executed. Now we define is necessary link the environment libgpio.so path to the envireonment variable LD_LIBRARY_PATH for SO can link a library with a program when a program make a call. Type , use the follow following commnad: <br>
<pre>export LD_LIBRARY_PATH=/root/svn.hylands.org/linux/gpio/lib/
</pre> Check that libgpio.so is linked correctly. Go to:$/svn.hylands.org/linux/gpio/app, gpio program will be found here. Type next command: <pre>ldd gpio </pre> ldd command list program dependencies and show its paths. The result will be similar than this: <pre>root@localhost:~/svn.hylands.org/linux/gpio/app# ldd gpio libgpio.so => /root/svn.hylands.org/linux/gpio/lib/libgpio.so (0x40197000) libc.so.6 => /lib/libc.so.6 (0x401a0000) /lib/ld-linux.so.3 (0x4008a000)</pre> 
=== Execute app<br> ===
4,199
edits