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 ...
随机推荐
- debian创建apt-proxy代理
由于公司网络比较慢.所以需要建立一个代理服务器或镜象站点!考虑到创建和维护镜象的投入比较大!所以选择apt-proxy代理来做!可以缓解公司带宽不足的矛盾.而且只有在代理缓存,没有相应组件的情况下才去 ...
- ASP.NET 去除所有HTML标记的方法
using System.Text.RegularExpressions /// <summary> /// 去除HTML标记 /// </summary> /// <p ...
- c# 操作word
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.We ...
- Android 高级UI设计笔记08:Android开发者常用的7款Android UI组件(转载)
Android开发是目前最热门的移动开发技术之一,随着开发者的不断努力和Android社区的进步,Android开发技术已经日趋成熟,当然,在Android开源社区中也涌现了很多不错的开源UI项目,它 ...
- C#获取CPU等硬件ID(转载)
System.Management命名空间提供对大量管理信息和管理事件集合的访问,这些信息和事件是与根据 Windows 管理规范 (WMI) 结构对系统.设备和应用程序设置检测点有关的.应用程序和服 ...
- js中replace的用法【转】
1.replace方法的语法是:stringObj.replace(rgExp, replaceText) 其中stringObj是字符串(string),reExp可以是正则表达式对象(RegExp ...
- android一些基础知识
android应用基于JAVA, 支持SQL,由于底层是LINUX,所以支持C/C++ 目前有两种编程:基于ADT的JAVA编程,基于NDK的C编程 Android编程环境需要哪些:官方推荐用JDK+ ...
- BZOJ1975 [Sdoi2010]魔法猪学院
本文版权归ljh2000和博客园共有,欢迎转载,但须保留此声明,并给出原文链接,谢谢合作. 本文作者:ljh2000 作者博客:http://www.cnblogs.com/ljh2000-jump/ ...
- 今天写了几个css属性
<!DOCTYPE html> <html> <head> <meta charset=UTF-8"> <title></t ...
- Commons Configuration2 - Quick start guide
原文:http://commons.apache.org/proper/commons-configuration/userguide/quick_start.html Reading a prope ...