使用 Eclipse 在 C 语言中轻松工作
嗯,我一直在使用 Eclipse 进行 Java 开发,现在尝试使用它来制作 C 应用程序。
问题是我对此感觉不太舒服。即:
- 我需要手动包含标题,即不是自动包含标题。
- 我从未见过可以解决任何问题的“快速解决方案”。
- 在编译之前我无法发现问题。
关于如何让自己感觉好一点有什么想法吗?
抱歉,如果我的问题相当愚蠢,但是从 Java 到 C 对我来说相当困难。
谢谢!
Umm, I've been using Eclipse for Java development and I am trying to use it now for making C apps.
The problem is that I don't feel too comfortable with it. Namely:
- I need to include headers by hand, i.e. not automatically.
- I've never seen a 'quickfix' to be available for any problem.
- I can't spot the problem before it has been compiled.
Any ideas on how I could make myself feel a bit better?
Sorry if my questions are rather stupid, but getting the way down from Java to C is rather hard on me.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
是的,从 Java 到 C 有点困难,当我编程 C 时 Java 还不存在。
一些评论:
在 C 中自动包含头文件很困难
请参阅 #include headers in C/C++
您可以使用 lint 来捕获一些错误...
http://syncor.blogspot.com/ 2010/03/using-lint-in-eclipse-with-netburner.html
考虑使用 gTest 等工具进行 TDD,并自动化构建过程。
http://www.slideshare.net/amritayan/test-driven- development-in-c,可能会帮助您开发不同的节奏。
Eclipse 中的 gtest ... https://github.com/ospector/gtest-gbar
有乐趣!
Yeah its a little harder to go from Java to C, Java didn't exist when I was programming C.
Some comments:
Automatically including headers is difficult in C
See #include headers in C/C++
You could use lint to catch some errors...
http://syncor.blogspot.com/2010/03/using-lint-in-eclipse-with-netburner.html
Consider doing TDD using something like gTest, and automate your build process.
http://www.slideshare.net/amritayan/test-driven-development-in-c, might help you develop a different rhythm.
gtest in Eclipse ... https://github.com/ospector/gtest-gbar
Have fun!
在 Mac OS XCode 上是一个选项。
启动时:
鲍勃是众所周知的(阿姨)。
您可以获得所有 XCode 快捷方式&在编辑器窗口中按 ESC 键完成代码。
嗯...我想我会开始实际使用它。 ;-)
On Mac OS XCode is an option.
On startup:
And Bob is your proverbial (aunty).
You get all the XCode short cuts & hit ESC in your editor window for code completion.
Hmmm.... think I'll start using it actually. ;-)
关于:
您可以获得有关语法错误的即时反馈。它们在左侧装订线中显示为问号,在错误下方显示为黄色波浪线。这会立即发生。确保在“窗口”->“首选项”->“常规”->“编辑器”->“文本编辑器”->“注释”下,选中了 C/C++ 索引器标记和 C/C++ 出现次数的“显示在”复选框。
re:
You can get immediate feedback on syntax errors. They show up as question marks in the left gutter and yellow squiggly lines under the error. This happens immediately. Make sure under Window->Preferences-General->Editors->Text Editors->Annotations that you have the "Show in" checkboxes checked for the C/C++ Indexer Markers and C/C++ Occurrences.