{"id":4061,"date":"2021-07-31T14:26:17","date_gmt":"2021-07-31T06:26:17","guid":{"rendered":"http:\/\/blog.coolcoding.cn\/?p=4061"},"modified":"2021-07-31T14:26:38","modified_gmt":"2021-07-31T06:26:38","slug":"luajit2-0-4-build%e9%94%99%e8%af%af","status":"publish","type":"post","link":"https:\/\/blog.coolcoding.cn\/?p=4061","title":{"rendered":"Luajit2.0.4-Build\u9519\u8bef"},"content":{"rendered":"\n<p>\u4eceWindows\u4e0a\u4f20Luajit\u5230Linux\u670d\u52a1\u5668\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u5982\u4e0b\u7684\u7f16\u8bd1\u9519\u8bef\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\nIn file included from lj_ffrecord.c:859:0:\nlj_recdef.h:224:1: error: \u2018recff_rawlen\u2019 undeclared here (not in a function)\n recff_rawlen,\n ^\nMakefile:645: recipe for target 'lj_ffrecord.o' failed<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>void emit_lib(BuildCtx *ctx)\n{\n    ......\n    int ok = 1;\n    if (!strcmp(buf, \"#if LJ_52\\n\"))\n      ok = LJ_52;\n    else if (!strcmp(buf, \"#if LJ_HASJIT\\n\"))\n      ok = LJ_HASJIT;\n    else if (!strcmp(buf, \"#if LJ_HASFFI\\n\"))\n      ok = LJ_HASFFI;\n    ......\n}<\/code><\/pre>\n\n\n\n<p>\u56e0\u4e3a\u5728Windows\u7cfb\u7edf\u4e2d\uff0c\u884c\u5c3e\u7ed3\u675f\u7b26\u662f&#8221;\\r\\n&#8221;\uff0c\u6240\u4ee5!strcmp(buf,&#8221;#if LJ_52\\n&#8221;)\u5c31\u4f1a\u8fd4\u56defalse\uff0c!strcmp(buf, &#8220;#if LJ_HASJIT\\n&#8221;\u5c06\u8fd4\u56detrue\uff0c\u53ef\u4ee5\u4f7f\u7528\u4e0b\u9762\u7684\u547d\u4ee4\u8f6c\u6362\u6574\u4e2a\u6587\u4ef6\u5939\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd luajit-2.0.4\nfind . -type f -print0 | xargs -0 dos2unix<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u4eceWindows\u4e0a\u4f20Luajit\u5230Linux\u670d\u52a1\u5668\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u5982\u4e0b\u7684\u7f16\u8bd1\u9519\u8bef\uff1a \u56e0\u4e3a\u5728Windows\u7cfb\u7edf\u4e2d\uff0c\u884c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/4061"}],"collection":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4061"}],"version-history":[{"count":2,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/4061\/revisions"}],"predecessor-version":[{"id":4063,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/4061\/revisions\/4063"}],"wp:attachment":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4061"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4061"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4061"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}