[英]How do I run source code in a mac terminal?
Please please help me, I am a computer illiterate female looking to convert a group of (.cng files) into jpegs. 请帮助我,我是一位不识字的女性,希望将一组(.cng文件)转换为jpeg。 I found a source code on a blog that instructs me to 我在博客上找到了可以指导我的源代码
Build it, then run it with something like this: 进行构建,然后使用以下命令运行它:
cng2jpg /path/to/images/199x/1990101/*.cng cng2jpg /path/to/images/199x/1990101/*.cng
Here is a link to the source code 这是源代码的链接
Does anyone know how I can run the source code to convert the files? 有谁知道我如何运行源代码来转换文件?
Here is a link to the blog post for reference for what exactly I am doing 这是博客文章的链接,以供您参考我到底在做什么
First, put the source code into a file named cng2jpg.c
. 首先,将源代码放入名为cng2jpg.c
的文件中。 Then open a terminal, navigate with cd
into the directory where you placed that file and type 然后打开一个终端,使用cd
导航到放置该文件的目录并键入
cc -o cng2jpg cng2jpg.c
This creates the program cng2jpg
. 这将创建程序cng2jpg
。 You can execute it by typing 您可以通过键入执行
path/to/cng2jpg input_file.cng
where path/to/cng2jpg
is the path where cng2jpg
was generated in the previous step. 其中path/to/cng2jpg
是其中路径cng2jpg
在先前步骤中产生的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.