当试图得到一个简单的nanomsg文件运行后,开始在这里的第一个目录:https://github.com/dysinger/nanomsg-exampleslibc.h:没有这样的文件或编译nanomsg管道样品
安装nanomsg到/usr/local/lib/nanomsg-0.2-alpha
。冉sudo ./configure
,sudo make check
,sudo make install
和sudo ldconfig
作为instructions said。所有测试通过。
当我运行它说libc.h未发现:
$ gcc pipeline.c /usr/local/lib/libnanomsg.a -o pipeline
pipeline.c:2:18: fatal error: libc.h: No such file or directory
compilation terminated.
什么是libc.h?大学毕业后我没有做过任何C编程。它是nanomsg还是C库的一部分?
$ which gcc
/usr/bin/gcc
Ubuntu 12.04.4 LTS
这个效果很好,但是请注意,我需要在构建nanomsg时运行'./configure --enable-static'以使其正常工作,否则会丢失符号在libnanomsg.a中。 – meowsqueak