run C source file like a script

TinyCC http://bellard.org/tcc linux 平台”C-script”:

#!/usr/local/bin/tcc -run
#include <stdio.h>
#include <stdlib.h>

double fac(double n)
{
  if (n <= 0.0) return 1;
  return n * fac(n - 1);
}

int main(int argc, char* argv[])
{
  if (argc != 2) {
    printf("Usage: %s <number>\n", argv[0]);
    return -1;
  }
}
时间: 2024-12-25 02:31:41

run C source file like a script的相关文章

(转) Resource file and Source file

基本上是这样的,Sourcefile文件夹里面放的是CPP文件这些,Resourcefile文件夹是资源文件夹,里面可以放你程序里需要的资源,包括图标,对话框,图片等等:对应的文件如下: Source Files - *.c,  *.cppHeader Files - *.hResource Files - *.ico, *.bmp, ... (转) Resource file and Source file,布布扣,bubuko.com

KEIL编译出现错误“source file is not valid utf-8”

实际情况是: .h文件一直报错source file is not valid utf-8的错误, 原因就是: 文件中出现了一个中文的":"导致的.总结就是:如出现此类错误,可能是字符不够标准. 原文地址:https://www.cnblogs.com/micro-st/p/8542335.html

failed to create pid file /var/run/rsyncd.pid: File exists报错

[[email protected] ansible_playbooks]# ps aux|grep rsyncroot      1799  0.0  0.0 114652   480 ?        Ss   Jun29   0:00 rsync --daemonroot     61754  0.0  0.0 112664   972 pts/2    S+   11:17   0:00 grep --color=auto rsync[[email protected] ansible_

Asp.Net程序报错 - error CS2001: Source file &#39;C:\Windows\TEMP\eulevokb.0.cs&#39; could not be found warning CS2008

一个Asp.Net项目,Excel导入功能出现如下错误:error CS2001: Source file 'C:\Windows\TEMP\eulevokb.0.cs' could not be foundwarning CS2008: No source files specified 本地执行是没有问题的,访问正式服务器就会出现这样的错误,搜索一下,原来是权限的问题. 解决办法:打开C盘,找到C:\Windows\TEMP目录,给temp添加IIS_IUSER的权限就没有问题了! Asp.

npm run dev 报错:missing script:dev

问题: 今天在运行vue项目时,在mac终端输入npm run dev,结果报错: 翻译是: npm错误:缺少script:dev npm错误:完整路径见:users/mymac/ .npm/_logs/2018-09-17T08_50_26_450Z-debug.log 解决办法: 1.打开相应的vue项目文件夹(我的项目名称是:my-project),打开package.json. 2.发现:在script里,并没有dev,而是serve,应该用npm run serve命令运行vue项目.

调试报“The source file is different from when the module was built.”问题的解决

It is related to the checksums which is used to ensure that you are stepping in matching source. You could disable it like this 找到Tools –> Options –> Debugging –> General,取消勾选“Require source files to exactly match the original version.”

Getting http address from text file by awk script

Today , I writed a awk script,it can get http address. The http address only contains number, alphabet,backslash and point. My awk script is following: #! /bin/awk -f { httpIndex=index($0,"http://") if ( httpIndex > 0 ) { match($0,/http:\/\/[

vs2008 提示 the source file is different from when the module was built,Would you like ...

解决办法: Tools-Options,选中Debugging选项卡,里面有个"Require source to exactly match..."的勾先去掉,然后稍微修改下代码,保存后,再把勾勾上,然后直接运行,发现断点已经命中(注意:在稍微修改代码之后,不能马上clean/rebuild)

Source Insight 如何将script等文件加入

点击菜单栏Options -> Document Options , 然后再弹出的对话框中找到File filter,文件过滤的设置,里面肯能有*.c;*.h 你在后面添加Makefile,注意前面加一个分号,要英文状态下的分号,效果如下: *.c;*.h,*.sh,Makefile 关闭对话框 最后,重新添加一下文件,点击Project -> Add and Remove Project Files 在弹出的对话框,左侧选择你工程目录,在右侧就能看到Makefile文件了, 最后点击一下Ad