安装tinyhttpd遇到的问题
2015-05-21 11:10
281 查看
andy@AndyMacBookPro:/usr/local/src/tinyhttpd$ make gcc -W -Wall -lsocket -lpthread -o httpd httpd.c httpd.c:437:52: warning: passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign] if (getsockname(httpd, (struct sockaddr *)&name, &namelen) == -1) ^~~~~~~~ /usr/include/sys/socket.h:561:74: note: passing argument to parameter here int getsockname(int, struct sockaddr * __restrict, socklen_t * __restrict) ^ httpd.c:491:24: warning: passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign] &client_name_len); ^~~~~~~~~~~~~~~~ /usr/include/sys/socket.h:555:69: note: passing argument to parameter here int accept(int, struct sockaddr * __restrict, socklen_t * __restrict) ^ httpd.c:495:40: warning: incompatible pointer types passing 'void (int)' to parameter of type 'void *(*)(void *)' [-Wincompatible-pointer-types] if (pthread_create(&newthread , NULL, accept_request, client_sock) != 0) ^~~~~~~~~~~~~~ /usr/include/pthread.h:311:11: note: passing argument to parameter here void *(*)(void *), void * __restrict); ^ httpd.c:495:56: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'void *' [-Wint-conversion] if (pthread_create(&newthread , NULL, accept_request, client_sock) != 0) ^~~~~~~~~~~ /usr/include/pthread.h:311:39: note: passing argument to parameter here void *(*)(void *), void * __restrict); ^ 4 warnings generated. ld: library not found for -lsocket clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [httpd] Error 1 andy@AndyMacBookPro:/usr/local/src/tinyhttpd$
关于这个问题,在命令行使用:
xcode-select –install
然后会提示安装:
相关文章推荐
- linux 安装tomcat遇到的问题
- Windows下安装MySQLdb遇到的问题及解决方法
- linux下安装opencv2.3, 遇到的问题汇总
- qmail 安装二(自己的遇到的问题)
- 打开Android studio遇到的一些问题,为什么安装jdk没有jdk.....的文件夹
- Ubunte 11.4 下安装 SSH遇到的问题
- 安装mongodb遇到的问题 ERROR: child process failed, exited with error number 100 总结
- Android Studio 2.3.1 安装中遇到的几个问题
- 安装oracle grid 时遇到的问题
- Android Studio安装时候遇到HAXM问题
- vs2010下安装qt4、opencv遇到的问题
- magento安装遇到的问题与解决
- QC安装遇到的问题
- 安装StartBBS 遇到的问题
- 安装DevStack时,遇到一些Python包安装失败,如何手动安装补救的问题
- 安装widows mysql 免安装版(zip) 步骤详解 以及遇到问题解决 以及忘记密码的修改方法
- 安装widows mysql 免安装版(zip) 步骤详解 以及遇到问题解决 以及忘记密码的修改方法
- 新手学Oracle数据库安装遇到问题
- Sony新机全新安装XP时遇到问题的解决方案
- Walle-瓦力上线部署安装以及遇到的问题