> And that's the this other stuff GCC oh hi-- that you would use, the GCC oh hi-- >> Exactly.
>,那个是你用到的,其他程序-,>>完全正确。
GCC -o So, on the one hand, I've run this command here, GCC dash O and this projector I'm highlighting things all day long on the screen here and you're not seeing any of it unfortunately it seems on this projector.
我在这运行了一条命令,这台投影仪我一天到晚的开着,一再强调屏幕上的东西,不幸地,你们却,在投影仪上没有看到它。
Essentially, this command make is just another program that uses GCC to compile my program for me but make is configurable.
从本质上来看,make命令就是一个,调用GCC来编译我们程序的程序,只不过make是可以配置的。
GCC We start at this lower level with GCC.
我们可以在低平台上运行。
W -W -W And now pedagogically, all these things, -W, -W, -W, these are essentially telling GCC to be really nit-picky.
现在教学上用的这些东西,这些本质上说明GCC是很挑剔的。
I just reran make or GCC does it for me, and now I've got all these errors. Well, let's see.
我刚重新运行了make,或者GCC为我编译了代码,现在我得到了这些错误,好的,让我们看看。
nano Well, anytime you run a program at the command line, like nano, you've almost always been putting one or more words nano hello c GCC hello c after that program's name; nano hello dot C, GCC hello dot C, and any number of MKDIR for make directory, and then peace at one or similar.
好的,任何时候在命令行中运行一个程序,就像,你几乎总是用1个或多个单词,在程序名的后面,许多的建立一个新的子目录,然后恢复平静。
GCC hello c So you see two similarities between the first version, GCC hello.c, and the second version but obviously I've just added which part for that second line.
你将会在第一个版本,和第二个版本GCC,-o,hello,hello,c之间,看到两点相似之处,很显然我们在第二个版本的第二行添加了一些东西。
This is telling GC to yell at why you as often as possible, even about the smallest things to really push you to write the best, the most secure, the most correct code possible.
这说明为什么GCC尽可能地经常地提醒你,即使是一些最小的事情,来要求你能够,编写出最好的,最稳定的,最正确的代码。
It's just hard to keep track of them at first but they all generally mean the same thing, provide additional input to this program called GCC by just specifying it on the command line.
刚开始是很难理解这些词的,但其实都是一个意思,所以,只要在命令行上为这个程序,再添加一个名曰GCC的输入就OK啦。
So I tried running a program in this little black and white window called GCC and we'll see it today working properly that is a so called compiler.
在一个名为GCC的黑色小窗口里,运行我们的程序,然后得出想要的结果,这就是所谓的编译器。
Nano hello c We did Nano for hello.c or whatever I called it, GCC to actually compile into 0s and 1, and then step three is to actually run it.
首先,第二,GCC,hello,c把它编译成01二进制文件,第三,运行。
Now, you might in some context have to add the right kind of parentheses so that GCC or your compiler doesn't get confused, but really they just reverse each other's processes.
现在,你可能要在相应的地方,加入一些圆括号,这样GCC或编译器就不会误解你的意思,但是它们颠倒了相互的过程。
When you want to use a library like CS50's, you can't just run GCC on your program.
当你想使用一些CS50的库,不是只运行GCC就够了。
So it turns out there's a program called sleep, just like there's a program called Nano, a program called GCC -- that is not what I want.
所以结果这个有一个sleep程序,就像这个有个叫做Nano的程序,一个叫做GCC的程序--那不是我想要的。
So just to reinforce this, I could run gcc math2.c but I'm getting a little tired of this a.out convention and recall that there's this utility called "make" that right now doesn't really improve much, other than give it a better name.
所以我强调这点,我可以运行“gcc,math2,c“,但是我不是很喜欢a,out这个默认的名字,想取消它,那么这里有个叫做“make“的命令“,这个命令现在没有很大的改进,只是把用来更改名字用的。
But what I ran was GCC and then I get back this big error message.
好吧,我刚运行了一条GCC命令,然后我们得到了这一个,报错信息。
- You then run a compiler, in our case called "GCC" -- -- one of the world's most popular -- and then you can run it with some number of switches, these command line arguments as they're called that somehow influences the behavior of this program.
然后你们运行编译器,在这里我们使用叫做“GCC“的编译器-,这是全球最流行的-,然后你们可以通过一些命令来运行这个编译器,这些命令行参数可以,影响这个程序的行为。
And you can write your source code in it but to compile something you don't run a command like GCC and then the name of the file, you instead click a button.
你们可以在上面写源代码,如果要编译的话,不用像GCC这样要输入命令,文件名,只需点击按钮就可以了。
And if you don't include it, GCC, the compiler will yell at you.
如果你没有include这个库函数,GCC的时候,编译器就会报错。
So with the fact that I'm now just back at my prompt is a good thing so now GCC hello c if I type this command GCC hello.c, this is gonna run this program that Apple wrote in this case GCC or someone else wrote called GCC.
也就是说我们现在安全返回,说明一切正常,现在我输入这条命令:,这代表运行hello,c这个程序,是由“Apple“或其他人编写的,名为。
So let's go ahead and compile this gcc math1.c.
我们接着通过键入“gcc,math1,c“来编译这个文件。
GCC hi2 c It seems to work.
回车。,GCC,,hi2。c,,enter。,好像工作了。
Now GCC was installed by a special installer.
注意,GCC使用一种特殊的安装程序安装。
Well, how do you do this with GCC?
这样的话,你们将如何GCC它们呢?
应用推荐