怎样在vc2010中编译lua文件
有人写过相同的文章貌似,在Tools/Extenal Tools做设置。
这里讲另外一点小技巧,当vc编译文件出错,双击出错的行就可以快速定位到文件和行,但是用lua编译的输出格式vc无法识别。
所幸lua的代码在手,改动简单
1. 搜索 %s:%d: %s 改为 %s:(%d): %s
2. 改lua.c的l_message
if (pname) fprintf(stderr, "%s: \n", pname); --加个\n
3. 在main的最后加上
report(L, status);
if (status == 0)
printf("ok !");
这样如果编译错误,可以轻松定位错误的代码行。