在LINUX中需要你的帮助:C [英] Need your HELP: C in LINUX

查看:64
本文介绍了在LINUX中需要你的帮助:C的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我是Linux新手并且想知道如何使用GCC来编译代码

用C语言写的?我不想将EMacs或VI用于我的编辑器。你能为
建议一个适合Linux编程的好IDE吗?


在Windows环境和linux环境下进行C编程

不同???


谢谢。


继续摇滚

解决方案

Nirjhar Oberoi说:





我是Linux新手并想要知道如何使用GCC编写代码

用C语言编写?



gcc -W -Wall -ansi -pedantic -Wformat-nonliteral -Wcast-align

-Wpointer-arith -Wbad-function- cast -Wmissing-prototypes

-Wstrict-prototypes -Wmissing-declarations -Winline -Wundef

-Wnested-externs -Wcast-qual -Wshadow -Wconversion -Wwrite-strings

-Wno-conversion -ffloat-store -O2 -o foo foo.c


我不想为我的编辑器使用EMacs或VI 。



很好,所以不要这样做。


你能否

为Linux编写一个很好的IDE for C Programming ..



Linux *是* C编程的IDE。


在Windows环境和Linux环境下进行C编程

不同???



C号是便携式语言。如果你只限于C语言和

标准库,那么你可以毫不费力地将你的C程序用于任何平台上的工作。

-

Richard Heathfield

Usenet是一个奇怪的地方 - dmr 29/7/1999
http://www.cpax.org.uk

电子邮件:rjh在上述域名中, - www。





11月24日上午10:48,Nirjhar Oberoi < nirjha ... @ gmail.comwrote:





我是Linux新手,想知道如何使用GCC编写代码

用C编写?我不想将EMacs或VI用于我的编辑器。



作为初学者,你可能会觉得使用vi有些尴尬编辑。但是,

vi

是一个功能强大的工具,可以快速,简单,有效地编辑

文件。

它提供某些特别有用的命令



写/读交流程序。

但是,如果你不这样做想要出于任何原因使用它,在linux系统上有文本

编辑器




< blockquote>

Nirjhar Oberoi写道:


>

我是Linux新手,想知道如何使用GCC编译代码

用C语言编写?我不想将EMacs或VI用于我的编辑器。你能为
建议一个适合Linux编程的好IDE吗?


在Windows环境和linux环境下进行C编程

不同???



您选择的编辑器与编译无关。编程

在windows中与linux中的编程方式不同

方式,任何其他任务都不同,但代码应该是

两者都相同(除非你使用系统特定的调用)。


在Linux上用C编程的最好的IDE是bash,使用

vim / emacs, make,ctags / etags和gdb。如果你立刻忽略了vim / emacs

,那你就是在伤害自己。如果你真的那么b $ b需要避免使用vim& emacs,你可以试试ed:


echo -e" a \ n #include< stdio.h> \ nint main(void){printf(\"你好\\\ n \");

返回0;} \\\
.\\\
wq foo.c\\\
" | ed 2>& 1 | gcc foo.c | ./a.out


....但那是疯狂的谈话。


Hi,

I am new to Linux and wanted to know how to use GCC to Compile the Code
written in C? I dont want to use EMacs or VI for my editor. Can you
suggest a good IDE for linux for C Programming..

Does C Programming on windows environment and on linux environment
differ???

Thank you.

Keep Rocking

解决方案

Nirjhar Oberoi said:

Hi,

I am new to Linux and wanted to know how to use GCC to Compile the Code
written in C?

gcc -W -Wall -ansi -pedantic -Wformat-nonliteral -Wcast-align
-Wpointer-arith -Wbad-function-cast -Wmissing-prototypes
-Wstrict-prototypes -Wmissing-declarations -Winline -Wundef
-Wnested-externs -Wcast-qual -Wshadow -Wconversion -Wwrite-strings
-Wno-conversion -ffloat-store -O2 -o foo foo.c

I dont want to use EMacs or VI for my editor.

Fine, so don''t do that.

Can you
suggest a good IDE for linux for C Programming..

Linux *is* an IDE for C programming.

Does C Programming on windows environment and on linux environment
differ???

No. C is a portable language. If you confine yourself to the C language and
standard library, you will have no difficulty getting your C programs to
work on either platform.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.




On Nov 24, 10:48 am, "Nirjhar Oberoi" <nirjha...@gmail.comwrote:

Hi,

I am new to Linux and wanted to know how to use GCC to Compile the Code
written in C? I dont want to use EMacs or VI for my editor.

As a beginner you may find it somewhat awkward to use "vi" editor. But,
"vi"
is a powerful tool that enables fast, simple and effective editing of
files.
It provides certain commands that are in particular helpful when you
are
writing/reading a c program.
However, if you dont want to use it for any reason, there are text
editors
available on linux systems.



Nirjhar Oberoi wrote:

>
I am new to Linux and wanted to know how to use GCC to Compile the Code
written in C? I dont want to use EMacs or VI for my editor. Can you
suggest a good IDE for linux for C Programming..

Does C Programming on windows environment and on linux environment
differ???

Your choice of editor has nothing to do with compilation. Programming
in windows is different from programming in linux in the same way
way that any other task is different, but the code should be
the same on both (unless you use system specific calls).

The best IDE for programming in C on linux is bash, using
vim/emacs, make, ctags/etags, and gdb. If you disregard vim/emacs
right off the bat, you are doing yourself a disservice. If you really
have a need to avoid vim & emacs, you might try ed:

echo -e "a\n#include <stdio.h>\nint main(void) { printf(\"Hello\\\n\");
return 0;}\n.\nwq foo.c\n" | ed 2>&1 | gcc foo.c | ./a.out

....but that''s crazy talk.


这篇关于在LINUX中需要你的帮助:C的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆