gnulib - 为什么当我使用 gcc 3.4.3 在 x86 Solaris 10 上构建 ratpoison 时会出现以下错误
问题描述
为什么当我使用 gcc 3.4.3 在 x86 Solaris 10 上构建 ratpoison 时会出现以下错误
文件 strcasestr completions.old 中未定义的第一个引用符号:致命:符号引用错误。没有输出写入ratpoison collect2:ld返回1退出状态gmake [2]:*** [ratpoison]错误1
但是 _GNU_SOURCE 在 completions.c 中。
/*
* Per POSIX strcasestr should be declared in strings.h
* glibc declares it in string.h instead and needs
* _ GNU_SOURCE
*/
#define _GNU_SOURCE
#include <strings.h>
#include <string.h>
解决方案
strcasestr
是一个 GNU 扩展。它不是 Solaris libc 的一部分。Gnulib 有一个你可以使用的实现。strcasestr
请参阅使用说明gnulib-tool
。
推荐阅读
- angular - ngFor 迭代对象数组并计算数组属性的长度
- php - 在 shell 和 PHP 中运行 cmd 命令的结果不同?
- c# - C# MVC WebService - 压缩文件并返回
- html - 垂直和水平显示彼此相关的图像
- routing - HAPROXY 基于多上下文的路由不起作用
- javascript - 执行更新用户突变时出现问题
- google-apps-script - 来自 Google.Script.Run 的函数调用返回“未定义”
- python - 仅在使用 Pyinstaller 可执行文件时临时保存的数据文件
- mysql - MySql 过程从不同的表返回变量结果
- php - 如何查看所有团队成员的帖子