有哪些有趣的 C/C++可以玩的图书馆吗?
我正在寻找一些新的 C 和 C++ 库。在过去的大部分时间里,我“意外地”偶然发现了一些 - 并且其中大多数在我从事的项目中找到了很好的用处。
库应该在 Mac OS X 和 Linux/POSIX 上运行,也可能在 Windows 上运行。
- Lua - 用于配置文件和基本应用程序脚本的最小且快速的脚本引擎。
- V8 - Google 引擎的快速 JavaScript,类似于 WebKit 的 JavaScriptCore。
- Cairo - 一个很好的图形库,类似于 Mac OS X 上的 QuickDraw/Quartz。
- < a href="http://zbar.sourceforge.net/" rel="noreferrer">ZBar - 条形码扫描仪库,允许扫描照片/图像/视频流以查找条形码并返回它们的值。
- ZLib - 一个非常紧凑的数据流压缩库。也使用了 zziblib 和 minizip。
- DynaPDF - 易于使用的 PDF 生成库。
- libusb - 一个通用 USB 库,允许便携式访问 USB 设备(我使用这是为了编写自定义 POS 打印机的基本驱动程序)。
- WebKit - 如果你想渲染 HTML/Web 内容,这是一个非常好的选择并在应用程序中使用它来为您的用户提供“更丰富”的用户体验。
- Qt4 - 用于各种桌面(可能还有移动)开发的通用框架。我花了很多时间在这上面——不知道我怎么能忘记这一点。 ;)
这应该标记为社区 wiki。如果您有有趣的内容要添加,请更新!
谢谢!
更新 1
我不是在寻找像 Boost 或 STL 这样的“生产力”库。相反,我正在寻找随机流派的“有趣的新东西” - 无论是图形库、脚本库、网络甚至 MOD/MIDI 播放库。抱歉我之前没说清楚。
I'm looking for a few new libraries and for C and C++. In the past most of the time I "accidently" stumbled across a few - and most of them found good use in projects I worked on.
Libraries should run on Mac OS X and Linux/POSIX and possibly on Windows.
- Lua - A minimal and fast scripting engine for configuration files and basic application scripting.
- V8 - A fast JavaScript by Google engine similar to WebKit's JavaScriptCore.
- Cairo - A good graphcis library similar to QuickDraw/Quartz on Mac OS X.
- ZBar - A barcode scanner library, which allows to scan photos/images/video streams for barcodes and return their value.
- ZLib - A very compact compression library for data streams. Used zziblib and minizip, too.
- DynaPDF - A easy-to-use PDF generation library.
- libusb - A universal USB library which allows for portable access to USB devices (I used this to write a basic driver for a custom POS printer).
- WebKit - This is a really nice one if you want to render HTML/Web contents and use it in applications to give your users a "richer" user experience.
- Qt4 - The general purpose framework for all kinds of desktop (and possibly mobile) development. Spending a lot of my time with that - no idea how I could forget that. ;)
This should be marked community wiki. Please update if you have something interesting to add!
Thanks!
Update 1
I'm not looking for "productivity" libraries like Boost or STL. Instead I'm looking for "interesting new stuff" of random genres - be it graphics libraries, scripting libraries, network or even MOD/MIDI playing libraries. Sorry I didn't make that clear before.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(15)
STL和Boost是必须的。
SQLite 提供了一个完全嵌入式、功能齐全的关系数据库,大小只有 10 万,您可以将其直接包含到您的项目中。由于其存在率很高,它也是一项非常有市场的技能(它包含在 Mozilla Firefox 以及 Android 和 iOS 中)。
如果您对创建用户界面感兴趣,请查看 ncurses - 这是用于创建用户界面的库创建许多终端用户界面,对于创建游戏和 shell 实用程序非常有用。 Qt 是一个很好的 C++ GUI 框架。
如果您对图形或创建游戏感兴趣,请考虑 SDL 或 OpenGL(如果您不介意只在 Windows 上工作,则考虑 DirectX)。
当然,还有数以千计的有趣的库。这实际上取决于您对什么感兴趣。
STL and Boost are musts.
SQLite provides a completely embedded, full-featured relational database in a few 100k that you can include right into your project. It's also a highly marketable skill because of its high presence (it's included in Mozilla Firefox as well as Android and iOS).
If you're interested in creating user interfaces, look into ncurses -- it's the library that was used to create many terminal user interfaces and can be very useful for creating games and shell utilities. Qt is a good GUI framework for C++.
If you're interested in graphics or creating games, consider SDL or OpenGL (or DirectX if you don't mind only working on Windows).
Of course, there are thousands of interesting libraries. It really depends on what you're interested in.
如果您对图像处理等感兴趣,那么 OpenCV 可能会很有趣。
If you're into Image processing etc, then OpenCV might be interesting to have a play around with.
每个 C++ 程序员都应该首先使用这两个库:
对于 GUI
Every C++ programmer should first play around with these two libraries:
For GUI
为什么不尝试 OGRE 并查看 3D 图形呢?
Why not try OGRE and peek into 3D graphics?
可视化库可能会引起兴趣。 查看此图库
Bullet 物理库是一个开源物理引擎,具有 3D 碰撞检测、软体动力学和刚性身体动力学。它用于游戏和电影的视觉效果。
Visualization Library could be of interest. Check out this Gallery
Bullet Physics Library is an open source physics engine featuring 3D collision detection, soft body dynamics, and rigid body dynamics. It is used in games, and in visual effects in movies.
Boost 似乎是一个显而易见的选择。
但如果您正在寻找更具体的东西,那么 OpenCV库目前似乎引起了很多兴趣 - 它是一个开源计算机视觉库。
Boost seems an obvious choice.
But if you're looking for something a bit more specific then the OpenCV library seems to be generating a lot of interest at the moment - it's an open source computer vision library.
如果您想尝试机器学习(分类器之类的东西),贝叶斯网络,或者尝试创建自己的算法,但想要使用一些对此有用的工具(例如现成的优化和线性代数工具)然后查看 dlib。我认为它很棒,但我正在努力,所以我有偏见:)
If you want to play around with machine learning (classifiers and that sort of thing), Bayesian networks, or try your hand at creating your own algorithms but want to use some tools useful for doing that (e.g. ready made optimization and linear algebra tools) then check out dlib. I think its great, but I work on it so I'm biased :)
我喜欢玩 cimg,它是一个非常好的、易于使用的图像库,非常适合玩弄 :p
http:// /cimg.sourceforge.net/
I enjoy playing around with cimg, its a very good, easy to use image library, good for messing around with :p
http://cimg.sourceforge.net/
我知道您可能正在寻找可以集成到日常工作中的库,但对于家庭项目,C++ Wiimote 库可能会带来一些有趣的项目:
http://pawst.com/post/471040-c-wiimote-library
I know you're proably looking for librarys that you can integrate into your day to day work, but for a home project the C++ Wiimote library might lead to some interesting projects:
http://pawst.com/post/471040-c-wiimote-library
Boost 但不是高效的部分:)
Boost.Xpressive 或如何在模板中编码正则表达式!
Boost.MPL 将为模板的使用提供新的视角,您将对模板元编程有更深入的了解,并更深入地了解 SFINAE 和模板推导的微妙之处。
Boost.Preprocessor 将为预处理器的使用和滥用提供新的视角。当使用模板生成模板函数和类的多个重载时,它非常方便(实际上 MPL 就是基于它的)。 的出现,人们的兴趣有所减弱
尽管随着...... C++0x!
新标准库及其线程
!学习使用
std::future
和std::function
,发现 lambda 的乐趣、基于范围的for
语法、>auto
关键字!C++0x 有如此多的新玩具,几乎感觉就像一门新语言...而且它也是您旧技能的一个很好的刷子,也是一个保持原样的好方法。
Boost but not the productive part :)
Boost.Xpressive or how to encode regular expressions in templates!
Boost.MPL will shed a new light on the use of template, you'll get a finer grok of template metaprogramming and dug deeper into the subtleties of SFINAE and template deduction.
Boost.Preprocessor will shed a new light on the use and abuse of the preprocessor. It comes very handy when using templates to generate multiple overloads of template functions and classes (and indeed the MPL is based upon it). The interest somewhat dwindle though with the advent of...
C++0x!
The new Standard Library with its threads!
Learn to use
std::future
andstd::function
, discover the joy of lambdas, the range-basedfor
syntax, theauto
keyword!C++0x has so many new toys that it almost feels like a new language... and it's also a good brush of your old skills and a good way to stay in.
Hiberlite:
类似于 Hibernate 的 SQLite 接口,有人应该编写使用 OTL 的 mysql 驱动程序!
LLVM:
将新代码动态 JIT 到您的 C++
Irrlicht 3D 引擎
Hiberlite:
a hibernate-like interface to SQLite, someone should write a driver to mysql using OTL!
LLVM:
JIT dynamically new code into your c++
Irrlicht 3D engine
Cinder 和 openFrameworks > 正如他们所说,是用于“创意编码”的很棒的工具包。这些库,或者更确切地说是库的集合,涵盖了从数学和网络到 2d、3d 图形、连接各种输入设备等的所有内容。
Cinder and openFrameworks are awesome toolkits for 'creative coding', as they put it. These libraries, or rather collection of libraries, cover everything from math and networking to 2d, 3d graphics, interfacing various input devices and more.
上次我愉快地深入研究与 c++ 相关的东西是使用 SWIG。
它是一个包装器/接口生成器,可让您将 C++ 代码链接到 Python。
意识到使用 SWIG 是多么简单,这本身就很有启发性,而且非常有趣。
然后您可以混合使用 Python 和 C++ 库。
玩得开心!
The last time I had fun digging into something related to c++ was with SWIG.
It is a wrapper/interface Generator that let you link your c++ code to Python.
Realizing how simple it is to use SWIG is enlightening and quite fun by itself.
Then you can play around mixing Python and C++ libraries.
Have fun!
对于游戏开发 - OGRE
对于 GUI 开发 - wxWidgets- CrossPlatform GUI Library
这两个库都是开源的。
For Game development - OGRE
For GUI developement - wxWidgets- CrossPlatform GUI Library
And both the libraries are OpenSource.
食人魔已经提到过。如果您想进入 3D,那么 Panda3D 我发现很容易学习。
Player/Stage 项目 是一个机器人控制界面和模拟库。您可以模拟机器人或在真实的机器人上运行它。
Ogre was already mentioned. If you want to go into 3D, then Panda3D I found easy to learn.
The Player/Stage Project is a robot control interface and simulation library. You could simulate robots or run it on real robots.