We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(7)
除 CCAN 之外我一无所知。
这里的问题是 C 对于库没有任何松散的规范。将其与 Java、Python 或 Perl 中的包进行比较。
即便如此,C 本身还是相当简单的,留下了很多东西让库自己实现。 I/O 抽象、内存管理、多线程、操作系统集成 - 库与任何资源的工作方式的微小差异可能会使它们不兼容,从而阻止它们在同一项目中使用。
我过去见过一些 C 的第 3 方商业库,涵盖了相当多的功能,但坦率地说,我不能推荐它们,而且老实说,我什至不记得它们的名字 - 因为它们常常造成更多的问题,而不是真正的帮助。 (好吧,我在撒谎:它们很少导致无法解决的问题:正是众多的解决方法导致了后来的问题。)
否则,对于 C 你可能想要检查 Glib 并(不要误会我的意思)也检查 C 标准根据我的经验,很少有人真正了解标准库本身中已有的许多实用程序。好吧,谷歌是你的朋友:有很多公共领域的代码可供你简单地按原样扔到你的项目中。
No known to me outside of CCAN.
The problem here is that C doesn't have any even loose specification for libraries. Compare that to e.g. packages in Java or Python or Perl.
And even then, C is quite bare bone itself leaving many things for libraries to implement themselves. I/O abstraction, memory management, multi-threading, OS integration - minor differences in how libraries work with any of the resources might make them incompatible, preventing them being used in the same project.
I have seen in past some 3rd party commercial libraries for C, covering quite a lot of functionality, but frankly I can't recommend them and honestly do not even remember their names - for they often were causing more problems than really helping. (OK, I'm lying: they were rarely causing unsolvable problems: it's the numerous workarounds which were causing often the problems later.)
Otherwise, for C you might want to check the Glib and (do not get me wrong) to also check the C standard as in my experience few actually know many of the utilities already in the standard library itself. And well, Google is your friend: lots of public domain code is there for you to simply throw as-is into your project.
我不知道有谁详细研究过这个问题,但我很想看看这些研究。我确信这与 C 编程社区本身的性质有关。
我认为答案的很大一部分(也许是主要的?)是:在万维网之前,不存在用于获取特定语言的库的单一资源。人们通过许多不同的方式获得他们的图书馆和图书馆的知识:通过 BBS、邮件列表、新闻组和期刊。当然,C 社区就是从这个时候开始的,我注意到这一时期和之前的其他语言在文化上也存在类似的差异。
我认为答案的另一部分与 C 文化本身的普遍去中心化有关。没有任何一个 C 编译器、没有一个 C 开发社区可以作为项目附着的中心和潜在点。而且 C 开发社区非常庞大,这进一步推动了这种去中心化和分裂。
就 C 库而言,操作系统发行版实际上在收集有用的 C/C++ 库方面做得非常好。 (我相信,Windows 是一个不幸的例外。)他们在这些语言上比大多数其他语言做得更好,可能是因为 C 和 C++ 在这些平台上是非常重要的系统语言。
就 CCAN 而言,我认为,鉴于存在不同的 C 代码分发者的数量,一个更有价值的项目是拥有一个链接到其自己本机站点上的各种库的站点,而不是试图让他们直接上传到 CCAN。我认为这个在谷歌之外还有用处,如果你尝试只浏览图书馆,它会给你带来很多噪音。问题是,如果存在这样的网站,您和大多数 C 社区会接受吗?
您可能会很高兴看到 CPAN 是如何开始的:http://www.brainbell.com /tutors/Perl/CPAN_History.htm
CPAN 的发展与其社区一样。因此,如果有领导力和兴趣,C/C++ 世界也可能会发生同样的事情。但这还没有发生。
I don't know of anybody who's studied this in detail, though I would be curious to see the studies. I'm sure it has to do with the nature of the C programming community itself.
I think a large (maybe the primary?) part of the answer is: before the WWW, there was no such thing as a single resource for obtaining libraries for a particular language. People obtained their libraries, and knowledge of libraries, via many different means: through BBSes, mailing lists, newsgroups, and periodicals. The C community dates from this time, of course, and I've noticed a similar difference in culture regarding other languages from this period and before.
I think another part of the answer has to do with the general decentralization of C culture itself. There's no one C compiler, no one C development community, that serves as a hub and a potential point for projects to attach themselves to. And the C development community is huge, which further drives this decentralization and splintering.
In the case of C libraries, OS distributions actually do a pretty good job of collecting useful C/C++ libraries out there. (With the unfortunate exception of Windows, I believe.) They do a better job in these languages than most others, probably since C and C++ are such important systems languages on these platforms.
As far as CCAN goes, I think what would make a more worthwhile project, given the number of different distributors of C code out there, is to have a single site that links to the various libraries on their own native sites, rather than trying to get them to upload straight to CCAN. I think there's a use for this in and apart from Google, which will give you a lot of noise if you try just browsing for libraries. The question is, would you and the bulk of the C communities out there embrace such a site if it existed?
You might be amused to see how CPAN got its start: http://www.brainbell.com/tutors/Perl/CPAN_History.htm
CPAN evolved just as its community did. So the same thing could happen in the C/C++ world if the leadership and interest is there. But it hasn't happened yet.
使用 http://www.google.com/codesearch?q=lang: http://www.google.com/codesearch 的 %22C%22 变体
= >即在搜索查询中添加
lang:"C"
use http://www.google.com/codesearch?q=lang:%22C%22 variant of http://www.google.com/codesearch
=> i.e. add
lang:"C"
in the search query有一个看起来很有前途的 C 包管理器,名为 CLib:
github:
https://github.com/clibs/clib
教程:
https://dev.to/noah11012/clibs-a-包管理器-for-c-4jmi
There is a C package manager which looks promising called CLib:
github:
https://github.com/clibs/clib
tutorial:
https://dev.to/noah11012/clibs-a-package-manager-for-c-4jmi
使用这些网站:
Use these web-sites:
有一个类似 Maven 的存储库和依赖管理系统,名为 Biicode。
目前还没有大量的库,但您可以自己添加开源项目的分支或通知原始作者。
编辑:biicode 背后的公司已经死了
编辑2:精神继任者似乎是 conan.io
There is a Maven-like repository and dependency management system called Biicode.
There isn't a huge collection of libraries on there yet, but you can add forks of open source projects yourself or inform original authors about it.
EDIT: the company behind biicode is dead
EDIT2: the spiritual successor seems to be conan.io
为什么需要一个 C 库集合的网站?只需使用谷歌即可。
Why do you need a website for a collection of C libraries? Just use Google.