solaris bind 符号未定义
– Special files used for network communication (or local interprocess communication)
– Not available in all UNIX versions (some don't represent network connections as files in the file system)
finally I get one example Unix Domain Socket from the website
http://beej.us/guide/bgipc/output/html/singlepage/bgipc.html#unixsockserv.
when trying to compile the application on platform solaris, It always produces the error message as follows:
symbol in file
bind /var/tmp//ccOrrHMQ.o
recv /var/tmp//ccOrrHMQ.o
send /var/tmp//ccOrrHMQ.o
accept /var/tmp//ccOrrHMQ.o
listen /var/tmp//ccOrrHMQ.o
socket /var/tmp//ccOrrHMQ.o
ld: fatal: Symbol referencing errors. No output written to echos
collect2: ld returned 1 exit status
I know It's linkage error and the c application could not find the related library file,but donot know how to solve it ,after one afternoon research, I find that we need to link to the socket library when compiling the c socket application on solaris.
symbols (functions, global variables) when linking. The actual name of
the file will be libmylib.a, and must be found in either the default
locations for libraries or in a directory added with the -L flag.
gcc -o echos echos.c -lsocket -lnsl
and the pthread is the same thing and the thread application can be compiled in the following way
gcc -o thread-create thread-create.c -lpthread.
You can find the lib in the dir /usr/lib
lrwxrwxrwx 1 root root 24 Aug 5 2009 libsocket.so -> ../../lib/libsocket.so.1
Reference Materials
http://beej.us/guide/bgnet/output/html/singlepage/bgnet.html#solaris
http://www.fortunecity.com/skyscraper/arpanet/6/cc.htm
http://developers.sun.com/solaris/articles/solaris_linux_app.html
solaris bind 符号未定义的更多相关文章
- JQuery $未定义
---恢复内容开始--- JQuery $未定义 转载▼ jquery是Yii集成的,利用jquery写的代码$(document).ready(function(){// 操作列表$('.ope ...
- 错误: “WebForm_DoPostBackWithOptions”未定义
无论是ASP.NET WebForm 还是 ASP.NET MVC项目,在本地程序测试没问题,但是部署在IIS上访问就会出现 错误: “WebForm_DoPostBackWithOptions”未 ...
- IE6 IE7 ‘JSON’ 未定义
今天在调试javascript程序,在FireFox和Chrome没有问题,但是在IE中,一些可以,就会出现如标题的错误:‘JSON’ 未定义: 在IE6,IE7一定有此错误,以及IE能设置兼容性视图 ...
- 使用ajax.dll时js脚本错误-XXX未定义
操作系统:Windows 7 IIS:7.5 ajax.dll现在用的比较少,但是以前的项目有这个,使用的时候很容易出现这个错误,因为总是会遗漏配置. 使用ajax.dll时,js脚本错误,无法调用后 ...
- .Net4.0的网站在IE10、IE11出现“__doPostBack未定义”的解决办法。
方法一.浏览器设置成兼容模式. 方法二.安装服务器版的.Net40的补丁.http://download.csdn.net/detail/5653325/6642051 方法三.点击VS的工具菜单-- ...
- .NET4.0 __doPostBack未定义
方法一.浏览器设置成兼容模式. 方法二.安装服务器版的.Net40的补丁.http://download.csdn.net/detail/5653325/6642051 方法三.点击VS的工具菜单-- ...
- “__doPostBack”未定义
项目中发现IE10等高级浏览器报错 ASP.NET无法检测IE10,导致_doPostBack未定义JavaScript错误 为此微软工程师解释如果发布asp2.0 asp4.0发布时,这些浏览器还未 ...
- jquery.uploadify 异常 “__flash__removeCallback”未定义
使用场景结合artdialog弹出框使用时发生“__flash__removeCallback”未定义,原因在于artdialog基于iframe加载的uloadify,在关闭artdialog的时候 ...
- IE11出现“__doPostBack未定义”的解决办法。
方法一:浏览器设置成兼容模式,这个是超级掩耳盗铃方法,你就没想过其他人也会出这个问题. 方法二.安装服务器版的.Net40的补丁.http://download.csdn.net/detail/565 ...
随机推荐
- 进程间通信之POSIX信号量
POSIX信号量接口,意在解决XSI信号量接口的几个不足之处: POSIX信号量接口相比于XSI信号量接口,允许更高性能的实现. POSIX信号量接口简单易用:没有信号量集,其中一些接口模仿了我们熟悉 ...
- 苹果开发工具:Xcode和Interface Builder
摘要:在Mac OS X上开发,首选Xcode继承开发环境.本文对开发工具套件中最重要的Xcode和Interface Builder两个工具做了简要介绍,并提供<苹果开发工具概述>PDF ...
- C++_直接插入排序(纯C版)
//用于比较大小 int compared(const void *key1,const void *key2) { cout<<"enter compare"< ...
- 解决JSP页面图片缓存问题
<% String imagepath="D:\\work\\dbUpdate\\src\\main\\webapp\\newyzm.png"; %> <img ...
- cocos2d-x中使用sqlite
在单机游戏中有几十个场景道具,每一个都有各自的状态(获得.未获得.获得个数)等等,如果在游戏中平凡涉及到这些道具的实时存储,那么使用文本就会稍慢.可以使用sqlite数据库来完成. 下载地址:http ...
- android开发之路10(文件的读写)
1.安卓中文件的数据存储实例(将文件保存到手机自带存储空间中): ①MainActivity.java public class MainActivity extends Activity imple ...
- webservice简单总结
一:webservice定义 webservice是一种基于xml,xsd封装格式,通过http协议通信的一种服务,支持跨平台.跨语言的 远程调用. 二:webservice优点 1:跨平台,无论是w ...
- IIS 7.0、IIS 7.5 和 IIS 8.0 中的 HTTP 状态代码 转
http://support.microsoft.com/kb/943891/zh-cn 日志文件位置 默认情况下,IIS 7.0.IIS 7.5 和 IIS 8.0 将日志文件放在以下文件夹中: i ...
- win8.1恢复win7 CTRL+Space切换输入法
win8用起来还是有很多好用的东西的,但是最让我受不了的就是输入法的切换,可以说是丧心病狂!!!折磨了我好久,今天终于找到了解决的办法! 那就是这位博客园的哥们给出的方案! http://www.cn ...
- poj 3264 RMQ
直接写个RMQ就能过. #include<iostream> #include<cstdio> #include<cstring> #include<algo ...