安装libuv
    简单,不介绍,安装好后注意提示

    1. Libraries have been installed in:
    2. /usr/local/lib
    3. If you ever happen to want to link against installed libraries
    4. in a given directory, LIBDIR, you must either use libtool, and
    5. specify the full pathname of the library, or use the '-LLIBDIR'
    6. flag during linking and do at least one of the following:
    7. - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
    8. during execution
    9. - add LIBDIR to the 'LD_RUN_PATH' environment variable
    10. during linking
    11. - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
    12. - have your system administrator add LIBDIR to '/etc/ld.so.conf'
    13. See any operating system documentation about shared libraries for
    14. more information, such as the ld(1) and ld.so(8) manual pages.

    第一个简单的代码

    1. #include <stdio.h>
    2. #include <uv.h>
    3. int main() {
    4. uv_loop_t *loop = uv_default_loop();
    5. printf("hello libuv");
    6. uv_run(loop, UV_RUN_DEFAULT);
    7. }
    1. g++ hello_libuv.c `pkg-config --cflags --libs libuv` -Wl,-rpath -Wl,/usr/local/lib
    2. objdump -p a.out #查看动态链接情况