关于GCC、Linux的一些资料
我是 GCC 和 Linux 的新手。我几乎所有的课程项目都使用Visual Studio,所以当切换到GCC和Linux时,我感到很痛苦,特别是在编译一些项目时,它抱怨一些错误。
我想我应该做点什么来摆脱这种恼人的情况。但我不知道如何获得一些材料,也许是关于链接器、关于 GCC 标志、关于库的材料,有人可以指出我应该学习或注意什么吗?
非常感谢
I am a newbie in GCC and Linux. I have been using Visual Studio for almost all course projects, so when switching to GCC and Linux, I feel so suffering, especially when compiling some projects and it complains for some errors.
I think I should do something to get rid of this annoying situation. But I don't know how to get some materials, maybe on linkers, on GCC flags, on libraries, could somebody kind enough pointing out what should I study or pay attention?
Thank you very much
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
Linux 手册页和信息页是最重要的资源之一,也是 Windows 用户最困惑的资源之一(SCNR:因为它是相当好的、完整且有用的文档,免费提供并预装在系统上)。您可以通过命令行
man
和info
命令与程序结合来访问它们,例如有时,您需要为 man 或 info 安装额外的 -doc 包页。例如,gcc 手册可以作为信息页面提供。
您需要学习的第二件事是查看正确工具的文档。 Visual Studio 执行了至少十几个 UNIX 程序的工作,因此请阅读文档的动机部分并尝试了解哪些程序执行哪些工作。也就是说:在 Linux 下,你的工具链中通常需要一个编辑器 (vim)、一个编译器 (gcc)、一个链接器 (ld)、归档索引器 (ranlib) 和一个调试器 (gdb),即使你不需要调用所有这些这些都是手工制作的。
此外,您还应该了解 autotools(
autoconf
和automake
)和libtool
,因为它们使您的工作变得更加高效。 > 更容易。Linux manpages and infopages are one of the most important resources, and one of the most confusing for Windows users (SCNR: because it is fairly good, complete and useful documentation that comes for free and pre-installed on the system). You can reach them via the command-line
man
andinfo
commands combined with the program, e.g.Sometimes, you need to install an extra -doc package for the man or the info pages. The gcc manual, for example, is available as an info page.
The second thing you need to learn is to look at the documentation of the right tool. Visual Studio performed the jobs of at least a dozen UNIX programs, so read the motivation section of the documentation and try to understand what program does what job. That is: You usually need an editor (vim), a compiler (gcc), a linker (ld), and archive indexer (ranlib) and a debugger (gdb) in your toolchain under Linux, even though you needn't call all of these by hand.
In addition, you should know about the autotools (
autoconf
andautomake
) andlibtool
because they make your job a lot easier.我不太明白你的痛苦是什么。是对Linux系统库的理解,还是只是因为在Linux上开发软件是痛苦的,因为你没有了解经验丰富的Linux开发人员是如何日复一日甚至每分钟地工作的?
I'm not sure to understand what is painful for you. Is it the understanding of Linux system libraries, or is it just that it is painful to develop software on Linux, because you didn't caught how experimented Linux developers work, on a day by day or even minute by minute basis?
GCC 用户手册 必须是您的第一个参考..您可以此处获取其在线/pdf 版本。
GCC user manual has to be your first reference..and you can get its online/pdf versions here..
有很多 GNU 工具的在线文档:
There is lots of online documentation for the GNU tools: