免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12
最近访问板块 发新帖
楼主: dajun
打印 上一主题 下一主题

[函数] hp-ux的localtime_r等函数问题? [复制链接]

论坛徽章:
0
11 [报告]
发表于 2006-10-09 17:37 |只看该作者
你用的是gcc吧?

  1. # cc -v
  2. (Bundled) cc: informational note 404: NLSPATH is /usr/lib/nls/msg/%L/%N.cat:/usr/lib/nls/msg/C/%N.cat:
  3. (Bundled) cc: informational note 404: INCLUDIR is INCLUDIR=/usr/include
  4. (Bundled) cc: informational note 404: LPATH is /usr/lib:/opt/langtools/lib:
  5. /usr/ccs/bin/ld /usr/ccs/lib/crt0.o -u main -lc  
  6. (Bundled) cc: informational note 413: Entering Link editor.
  7. /usr/ccs/bin/ld: Unsatisfied symbols:
  8.    main (Not referenced yet! Probably due to -u option)
复制代码

论坛徽章:
0
12 [报告]
发表于 2006-10-09 17:38 |只看该作者
time.h

_NAMESPACE_STD_END
#      ifdef _REENTRANT
#        ifndef _ASCTIME_R
#          define _ASCTIME_R
#          ifndef _PTHREADS_DRAFT4
             extern char *asctime_r(const __struct_tm *, char *);
#          else /* _PTHREADS_DRAFT4 */
             extern int asctime_r(const __struct_tm *, char *, int);
#          endif /* _PTHREADS_DRAFT4 */
#        endif



不过没找到_POSIX_PTHREAD_SEMANTICS

论坛徽章:
0
13 [报告]
发表于 2006-10-09 17:40 |只看该作者
编译你的那个文件时不是gcc

-bash-2.05b$ ls -al `which cc`
-r-xr-xr-x   1 bin        bin         614400 Mar  5  2006 /usr/bin/cc
-bash-2.05b$ ls -al `which gcc`
-rwxr-xr-x   3 root       sys         106496 Nov 11  2004 /usr/local/bin/gcc
-bash-2.05b$

论坛徽章:
0
14 [报告]
发表于 2006-10-09 17:40 |只看该作者
谢谢你们了!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP