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 ...
随机推荐
- SQL SERVER NULL值和连接注意问题
联接表的列中的 null 值(如果有)互相不匹配.如果其中一个联接表的列中出现空值,只能通过外部联接返回这些空值(除非 WHERE 子句不包括空值). 下面的两个表中,每个表中要参与联接的列中均包 ...
- js学习笔记第二篇
Js笔记整理 1.StringAPI a) 大小写转换:str.toUpperCase();str.toLowerCase(); b) 获取指定位置字符: Str[i]-- ...
- hive-初看hive
网上搜了一下找了很多介绍hive的资料,不是官方翻译就是含糊描述,对于刚接触的很难直观认识 我从一本介绍hadoop的书里找到了一些hive的资料,没太多废话.可以看看 http://pan.baid ...
- A Famous Music Composer
描述 Mr. B is a famous music composer. One of his most famous work was his set of preludes. These 24 p ...
- How to update FVDI Commander driver to latest V2015.6.2
As FVDI Commander products are upgraded to new versions, I often receive emails from customers askin ...
- nodejs的mysql模块学习(四)断开数据库连接
断开连接有两种方式 end()函数 在这种情况下 所有先前排队的查询 仍然可以继续继续发送到服务器,但是如果在执行到断开连接的命令之前发生了致命的错误,那么end()将不会被执行 connection ...
- html笔记03:表单
1.表单是用来收集用户填写的信息,可以说表单就是一个容器,里面的元素的类型可以不一样,所表示的功能也不同. 表单基本语法: <html> <head> <title> ...
- mysql颠覆实战笔记(六)--商品系统设计(三):商品属性设计之固定属性
今天我们来讲一下商品属性 我们知道,不同类别的商品属性是不同的. 我们先建一个表prod_class_attr:
- sql 自定义函数--固定格式字符转时间类型
遇到一个德国的客户,他们的时间格式是JJJJ-TT-DD HH:MM:SS,程序按照这个格式将时间插入数据库,但是在sql自带的转换函数convert.cast过程中报错,网上搜了下都说用conver ...
- ORM之PetaPoco入门(二)--Petapoco基本用法
1. Petapoco基本用法 1.1. 创建示例工程 首先创建一个工程文件,为了便于展示数据这里创建一个类型为:WindowsApplication的工程文件.命名为:PetapocoTest. 程 ...