简体   繁体   English

在Mac上编译C代码

[英]Compile C code on Mac

I am trying to compile this interesting program on my mac. 我正在尝试在Mac上编译这个有趣的程序。 The program can make your terminal looks like the one in Matrix movie. 该程序可以使您的终端看起来像Matrix电影中的终端。 Here is the link . 这是链接

But when I type "make" and press enter in the upzipped source code folder, here is the error: 但是,当我键入“ make”并在压缩后的源代码文件夹中按Enter时,这是错误:

make: *** No targets specified and no makefile found.  Stop.

I am not very familiar with things that need to compile. 我对需要编译的东西不是很熟悉。 I know the concept of compilation and c/c++, but have little practical experience. 我知道编译和c / c ++的概念,但是实践经验很少。 Is it possible to compile this code on mac? 是否可以在Mac上编译此代码? If it is easy, can you tell me how I can compile this code from the above link? 如果很简单,您能告诉我如何从上面的链接中编译此代码吗?

Go to the folder of your source code with terminal and type ./configure and hit enter. 使用终端转到源代码文件夹,然后键入./configure然后按Enter。 Then call make . 然后致电make

The package uses the autoconf tools to generate the Makefile(s) required to build the cmatrix application. 该软件包使用autoconf工具生成生成cmatrix应用程序所需的Makefile。

In order to generate the makefiles, you need to run the configure script: $ ./configure 为了生成makefile,您需要运行配置脚本: $ ./configure

If you have a look at the INSTALL file, it should provide some additional information, such as additional arguments that you may need to pass into the configure script for your platform. 如果您查看INSTALL文件,它应该提供一些其他信息,例如您可能需要传递到平台的configure脚本中的其他参数。

Once the configure script has run, you can run make as normal, and it should compile the application. 一旦运行了配置脚本,就可以正常运行make了,它应该编译应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM