锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久久亚洲国产天美传媒修理工,亚洲第一在线综合网站,午夜精品久久久久久久久久久久久http://m.shnenglu.com/sunicdavy/archive/2017/04/20/214874.html鎴橀瓊灝忕瓚鎴橀瓊灝忕瓚Thu, 20 Apr 2017 04:52:00 GMThttp://m.shnenglu.com/sunicdavy/archive/2017/04/20/214874.htmlhttp://m.shnenglu.com/sunicdavy/comments/214874.htmlhttp://m.shnenglu.com/sunicdavy/archive/2017/04/20/214874.html#Feedback0http://m.shnenglu.com/sunicdavy/comments/commentRss/214874.htmlhttp://m.shnenglu.com/sunicdavy/services/trackbacks/214874.html浣跨敤Visual Studio Code璋冭瘯Golang宸ョ▼

  • 鏈綆鍗曠殑璋冭瘯鏀葷暐
  • 澶氶」鐩皟璇? 閫傜敤涓漢寮鍙戝拰欏圭洰寮鍙?/li>
  • 鏃犻渶淇敼緋葷粺鐜鍙橀噺
  • 鍑嗗VSCode

    鍦ㄥ畼緗戜笅杞芥渶鏂扮増鐨刅SCode:

    https://code.visualstudio.com/

    瀹夎Golang鎻掍歡

    • 鎵撳紑鎵╁睍闈㈡澘

      VSCode->鏌ョ湅->鎵╁睍

    • 鎵懼埌Go鎻掍歡 鍦ㄦ悳绱㈡閲岃緭鍏o, 鎵懼埌絎簩琛屽啓鏈?Rich Go language support for Visual Studio Code鐨勬彃浠? 鐐瑰嚮瀹夎

      娉ㄦ剰涓嶆槸鎺掑悕鏈楂樼殑

    • 閲嶅惎緙栬緫鍣?/p>

  • 鎵撳紑璋冭瘯闈㈡澘

    VSCode->鏌ョ湅->璋冭瘯

  • 娣誨姞璋冭瘯鐩爣

    鍦?娌℃湁璋冭瘯"鐨勪笅鎷夋涓偣鍑?娣誨姞閰嶇疆.."

  • 娣誨姞鐩爣璋冭瘯閰嶇疆

    渚嬪瓙:

    {
        "version": "0.2.0",
        "configurations": [
            {
                "name": "Launch",
                "type": "go",
                "request": "launch",
                "mode": "debug",
                "remotePath": "",
                "port": 2345,
                "host": "127.0.0.1",
                "program": "${fileDirname}",
                "env": {
                    "GOPATH":"D:/Develop/vscodegolang"
                },
                "args": [],
                "showLog": true
            }
        ]
    }
  • 鍏朵腑: "port", "host"閮芥槸go鎻掍歡鑷姩鐢熸垚鐨?/p>

    "env"涓鴻緗幆澧冨彉閲? 璁劇疆涓轟綘鐨勫伐紼嬬洰褰曞氨鍙互(鍖呭惈bin, src鐨勬枃浠跺す)

    鍑嗗璋冭瘯鎻掍歡

    姝ゆ椂鎵懼埌main.go鎸塅5, 浼氭姤閿欐彁紺?

    Failded to continue:"Cannot find Delve debugger. Install from https://github.com/derekparker/delve & ensure it is in your "GOPATH/bin" or "PATH"

    鎴戜滑浣跨敤go鍛戒護琛岀紪璇戣皟璇曞櫒

    go get github.com/derekparker/delve/cmd/dlv

    灝哾lv璋冭瘯鍣ㄦ斁鍦℅OPATH(宸ョ▼鐩綍)鐨刡in鐩綍涓?/p>

    閫変腑瑕佽皟璇曠殑main.go, 鐐瑰嚮F5, 鏃㈠彲浠ュ紑濮嬭皟璇?/p>

    璋冭瘯蹇嵎閿拰Visual Studio緋諱竴鑷?/p>

    • F9 鍒囨崲鏂偣
    • F10 Step over
    • F11 Step in
    • Shift+F11 Step out

    娉ㄦ剰鐐?/p>

    • 鏌愪簺緇撴瀯浣撴垚鍛樻棤娉曠洿鎺ユ樉紺烘椂, 鍙互鐩存帴閫変腑鍙橀噺鍚? 娣誨姞鍒扮洃瑙? 鎴栬呭彸閿偣鍑? "璋冭瘯:姹傚?

    鍦╨aunch.json涓彲浠ユ坊鍔犲緇勮皟璇曞叆鍙? 閫氳繃璋冭瘯闈㈡澘涓変腑瀵瑰簲鐨勯厤緗紑鍚笉鍚岀洰鏍囩殑璋冭瘯

    {
        "version": "0.2.0",
        "configurations": [
            {
                "name": "client",
                "type": "go",
                "request": "launch",
                "mode": "debug",
                "remotePath": "",
                "port": 2345,
                "host": "127.0.0.1",
                "program": "${fileDirname}",
                "env": {
                    "GOPATH":"D:/Develop/vscodegolang"
                },
                "args": [],
                "showLog": true
            },
    
            {
                "name": "server",
                "type": "go",
                "request": "launch",
                "mode": "debug",
                "remotePath": "",
                "port": 2345,
                "host": "127.0.0.1",
                "program": "${workspaceRoot}/src/server",
                "env": {
                    "GOPATH":"D:/Develop/vscodegolang"
                },
                "args": [],
                "showLog": true
            }
        ]
    }

    "program"涓殑"${fileDirname}"鏄互褰撳墠閫変腑鏂囦歡浣滀負鍚姩鐐?/p>

    鏇村緩璁嬌鐢?program"鐨?${workspaceRoot}", 浠ュ寘鍚嶄綔涓哄惎鍔ㄧ偣鐨勬柟寮忚繘琛岄厤緗?/strong>

    https://code.visualstudio.com/Docs/editor/debugging



    ]]>浣跨敤delve璋冭瘯Golang紼嬪簭鎶宸?/title><link>http://m.shnenglu.com/sunicdavy/archive/2016/09/03/214254.html</link><dc:creator>鎴橀瓊灝忕瓚</dc:creator><author>鎴橀瓊灝忕瓚</author><pubDate>Sat, 03 Sep 2016 10:12:00 GMT</pubDate><guid>http://m.shnenglu.com/sunicdavy/archive/2016/09/03/214254.html</guid><wfw:comment>http://m.shnenglu.com/sunicdavy/comments/214254.html</wfw:comment><comments>http://m.shnenglu.com/sunicdavy/archive/2016/09/03/214254.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/sunicdavy/comments/commentRss/214254.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/sunicdavy/services/trackbacks/214254.html</trackback:ping><description><![CDATA[<p style="margin-right: 0px; margin-bottom: 10px; margin-left: 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1; margin-top: 0px !important;"></p><p style="margin-right: 0px; margin-bottom: 10px; margin-left: 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1; margin-top: 0px !important;">Google瀹樻柟涓篏olang鐨勮皟璇曚緥瀛愰粯璁や嬌鐢ㄤ簡gdb</p><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">鐒惰? 浣跨敤gdb璋冭瘯go紼嬪簭浼氶亣鍒癵oroutine鐨勫悇綾婚棶棰? 鍥犱負gdb涓嶆噦go</p><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">鍥犳, 榪欓噷浣跨敤delve榛戠鎶鏉ヨ繘琛孏olang鐨勭▼搴忚皟璇?/p><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">綰懡浠よ璋冭瘯鏂規硶鍦ㄧ綉涓婂緢瀹規槗鎼滅儲鍒? 鏈枃涓昏浠iteIDE鏉ヨ繘琛岀▼搴忚皟璇?/p><h1>鍏抽棴緙栬瘧鍣ㄤ紭鍖?/h1><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">姝e父go build/install鍑虹殑go紼嬪簭鏄畬鍏ㄤ紭鍖栬繃鐨? 寮鴻浣跨敤璋冭瘯鍣ㄦ寕鎺ヨ皟璇曟椂, 鏌愪簺local鍙橀噺/lamda琛ㄨ揪寮忔崟鑾風殑鍙橀噺浼氱洿鎺ヨ繘鍏ュ瘎瀛樺櫒, 鏃犳硶浣跨敤璋冭瘯鍣ㄦ煡鐪?/p><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">鍒犳帀鎵鏈夌殑pkg, 涓篵uild鎴杋nstall鍙傛暟鍔犲叆鍏抽棴緙栬瘧鍣ㄤ紭鍖栫殑鍙傛暟 -gcflags "-N -l"</p><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">渚嬪:</p><pre linenums="" prettyprinted"="" style="margin-top: 10px; margin-bottom: 10px; border: 1px solid #e1e1e8; font-size: 13px; line-height: 19px; overflow: auto; padding: 10px; border-radius: 3px; word-wrap: break-word; font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; box-shadow: #fbfbfc 40px 0px 0px inset, #ececf0 41px 0px 0px inset; widows: 1; background-color: #f7f7f9;"><ol style="margin: 0px; padding-left: 30px !important; color: #1e347b;"><li style="margin: 0px; color: #bebec5; line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code style="margin: 0px; padding: 0px; border: none; border-radius: 3px; word-wrap: break-word; font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; max-width: 100%; background: transparent;"><span style="color: #48484c; margin-top: 0px;"> go install </span><span style="color: #93a1a1;">-</span><span style="color: #48484c;">gcflags </span><span style="color: #dd1144;">"-N -l"</span><span style="color: #48484c;"> svc\gamesvc</span></code></li></ol></pre><h2>delve璋冭瘯鍣ㄥ畨瑁呮柟娉?/h2><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">LiteIDE鑷甫浜唃db, 浣嗘槸娌℃湁delve璋冭瘯鍣? 闇瑕佽嚜琛屽畨瑁? 鍛戒護濡備笅</p><pre linenums="" prettyprinted"="" style="margin-top: 10px; margin-bottom: 10px; border: 1px solid #e1e1e8; font-size: 13px; line-height: 19px; overflow: auto; padding: 10px; border-radius: 3px; word-wrap: break-word; font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; box-shadow: #fbfbfc 40px 0px 0px inset, #ececf0 41px 0px 0px inset; widows: 1; background-color: #f7f7f9;"><ol style="margin: 0px; padding-left: 30px !important; color: #1e347b;"><li style="margin: 0px; color: #bebec5; line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code style="margin: 0px; padding: 0px; border: none; border-radius: 3px; word-wrap: break-word; font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; max-width: 100%; background: transparent;"><span style="color: #48484c; margin-top: 0px;">go </span><span style="color: #1e347b;">get</span><span style="color: #48484c;"> github</span><span style="color: #93a1a1;">.</span><span style="color: #48484c;">com</span><span style="color: #93a1a1;">/</span><span style="color: #48484c;">derekparker</span><span style="color: #93a1a1;">/</span><span style="color: #48484c;">delve</span><span style="color: #93a1a1;">/</span><span style="color: #48484c;">cmd</span><span style="color: #93a1a1;">/</span><span style="color: #48484c;">dlv</span></code></li></ol></pre><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">delve璋冭瘯鍣ㄤ細琚斁鍒頒綘鐨凣OPATH/bin涓?/p><h1>LiteIDE涓殑delve璋冭瘯鍣ㄩ厤緗?/h1><h2>閫夋嫨璋冭瘯鍣?/h2><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">鍦↙iteIDE鑿滃崟涓夋嫨 璋冭瘯->debugger/delve</p><h2>delve鐜鍙橀噺璁劇疆</h2><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">榪欎釜鏃跺? LiteIDE渚濈劧鎵句笉鍒癲elve, 鍥犱負瀹冧笉鍦ㄧ幆澧冨彉閲廝ATH涓? 榪欓噷鏃犻渶淇敼鐜鍙橀噺, 鍙渶瑕丩iteIDE鐨勭幆澧冮厤緗?/p><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">鍦↙iteIDE鑿滃崟涓夋嫨 鏌ョ湅->緙栬緫褰撳墠鐜, 鍦ㄥ脊鍑虹殑鏂囨。涓慨鏀?/p><pre linenums="" prettyprinted"="" style="margin-top: 10px; margin-bottom: 10px; border: 1px solid #e1e1e8; font-size: 13px; line-height: 19px; overflow: auto; padding: 10px; border-radius: 3px; word-wrap: break-word; font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; box-shadow: #fbfbfc 40px 0px 0px inset, #ececf0 41px 0px 0px inset; widows: 1; background-color: #f7f7f9;"><ol style="margin: 0px; padding-left: 30px !important; color: #1e347b;"><li style="margin: 0px; color: #bebec5; line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code style="margin: 0px; padding: 0px; border: none; border-radius: 3px; word-wrap: break-word; font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; max-width: 100%; background: transparent;"><span style="color: #48484c; margin-top: 0px;">PATH</span><span style="color: #93a1a1;">=</span><span style="color: #48484c;">c</span><span style="color: #93a1a1;">:</span><span style="color: #48484c;">\mingw32\b</span><span style="color: #1e347b;">in</span><span style="color: #93a1a1;">;%</span><span style="color: #48484c;">GOROOT</span><span style="color: #93a1a1;">%</span><span style="color: #48484c;">\b</span><span style="color: #1e347b;">in</span><span style="color: #93a1a1;">;%</span><span style="color: #48484c;">PATH</span><span style="color: #93a1a1;">%;</span><span style="color: #48484c;">c</span><span style="color: #93a1a1;">:</span><span style="color: #48484c;">\y</span><span style="color: #1e347b;">our</span><span style="color: #48484c;">\path\to\delve</span></code></li></ol></pre><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">鍘繪帀PATH鍓嶇殑娉ㄩ噴#, 鍦?PATH%娣誨姞鍒嗗彿, 鐒跺悗鍜屼綘鍒癲elve璋冭瘯鍣ㄧ殑璺緞</p><h2>寮濮嬭皟璇?/h2><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">閫夋嫨浣犵殑宸ョ▼, 鐐瑰嚮F5, 榪涘叆璋冭瘯妯″紡</p><h2>璋冭瘯鍣ㄦ樉紺哄彉閲忓?/h2><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;"><img src="file:///D:/Documents/My%20Knowledge/temp/6f9eec62-fe6c-4f28-89ad-acbade688a96/4/index_files/2be001ea-878e-4e38-9209-76ef93d427f0.png" style="border: 0px; max-width: 100%; margin: 2px 0px; height: auto !important;" alt="" /></p><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">LiteIDE浣跨敤delve璋冭瘯鏃? 鏃犳硶鍦?鍙橀噺 鐩戣絳夌獥鍙d腑姝g‘鎹曟崏delve璋冭瘯榪斿洖鏁版嵁(鍥犱負鏍煎紡澶鏉備簡…)</p><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">娌″叧緋? 鎴戜滑浣跨敤鍛戒護琛岄厤鍚堟樉紺哄嵆鍙?/p><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">LiteIDE鎺у埗鍙版垨璋冭瘯杈撳嚭紿楀彛鍦╠elve璋冭瘯鏃? 瀹為檯涓婃槸涓涓爣鍑嗗懡浠よ <br />鍛戒護濡備笅</p><ul style="margin: 10px 0px; padding-left: 32px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; font-size: 15px; line-height: 24px; widows: 1;"><li style="margin: 0px 0px 5px;"><p style="margin: 0px;">p 鍙橀噺鍚嶅彲浠ユ煡鐪嬪彉閲忓?/p></li><li style="margin: 5px 0px;"><p style="margin: 0px;">locals鏌ョ湅灞閮ㄥ彉閲?/p></li><li style="margin: 5px 0px;"><p style="margin: 0px;">ls鍙煡鐪嬪綋鍓嶆枃浠?/p></li><li style="margin: 5px 0px;"><p style="margin: 0px;">stack鏌ョ湅鏍?/p></li><li style="margin: 5px 0px;"><p style="margin: 0px;">help鍙互鏌ョ湅鍚勭甯姪</p></li></ul><h2>璋冭瘯澶栭儴紼嬪簭</h2><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">濡傛灉浣犵殑紼嬪簭鏄閮ㄧ▼搴? 鎴栬呬嬌鐢╣o install瀹夎鍒癎OPATH/bin鐩綍鐨勭▼搴? 閭d箞浣跨敤delve璋冭瘯鍣ㄥ惎鍔ㄧ▼搴忔椂, 鍙兘浼氱鍒板惎鍔ㄨ礬寰勯敊璇殑闂</p><p style="margin-top: 10px; margin-right: 0px; margin-left: 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1; margin-bottom: 0px !important;">浣跨敤LiteIDE鑿滃崟 璋冭瘯->璋冭瘯鍏朵粬搴旂敤紼嬪簭… 濉叆浣犺璋冭瘯紼嬪簭鐨勮礬寰勪互鍙婂伐浣滅洰褰? 鍙互瑙e喅榪欎釜闂</p><p style="margin-top: 10px; margin-right: 0px; margin-left: 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1; margin-bottom: 0px !important;"></p><img src ="http://m.shnenglu.com/sunicdavy/aggbug/214254.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/sunicdavy/" target="_blank">鎴橀瓊灝忕瓚</a> 2016-09-03 18:12 <a href="http://m.shnenglu.com/sunicdavy/archive/2016/09/03/214254.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>lua璋冭瘯鐨勫伐鍏烽夋嫨http://m.shnenglu.com/sunicdavy/archive/2014/09/28/208441.html鎴橀瓊灝忕瓚鎴橀瓊灝忕瓚Sun, 28 Sep 2014 07:19:00 GMThttp://m.shnenglu.com/sunicdavy/archive/2014/09/28/208441.htmlhttp://m.shnenglu.com/sunicdavy/comments/208441.htmlhttp://m.shnenglu.com/sunicdavy/archive/2014/09/28/208441.html#Feedback7http://m.shnenglu.com/sunicdavy/comments/commentRss/208441.htmlhttp://m.shnenglu.com/sunicdavy/services/trackbacks/208441.html鏈榪戠湅鍒頒竴涓叧浜巚s鐨刲ua璋冭瘯鎻掍歡, 瑁呬簡vs2012璇曚簡涓? 蹇嶄笉浣忓彂姝ゆ枃鎬葷粨涓媗ua鍚勭璋冭瘯宸ュ叿

    Decoda

        榪欐槸鐜頒粖鍦扮悆涓婅皟璇昹ua5.1鏈鏂逛究鐨勫伐鍏? 娌℃湁涔嬩竴. 寮哄ぇ鐨勬敞鍏ュ紡璋冭瘯, 鎬ц兘鏋侀珮.鏀寔 鎸傛帴榪涚▼, 鍙橀噺灞曞紑, 鏂偣絳夊悇縐嶆棩甯告墍闇.

    鏃╂湡鐨凞ecoda鏄敹璐瑰伐鍏? 鍥犳璐ㄩ噺闈炲父楂?

        Decoda鐜板湪宸茬粡鍋滄寮鍙戝茍寮婧愪簡, 璋冭瘯lua5.2浼歝rash. 婧愪唬鐮佸彲浠ヤ綔涓轟竴縐嶆妧鏈弬鑰? 寰堝dll娉ㄥ叆淇敼鎶鏈? 鐏板父鐗沊

    image

    LuaStudio

       姣旇緝浼樼鐨勮皟璇曞伐鍏?鍥犱負鏀惰垂), 鍙互璋冭瘯lua5.1/5.2, 鐣岄潰灞炰簬vs2008綾誨瀷, 鍦熻豹鍙互鑰冭檻涔板嚑濂楄瘯璇?/p>

     

    ZeroBrane Studio

    瀵筶ua5.1鏀寔杈冨ソ, 5.2涔熻兘璋冧絾鍋跺皵榪樻槸浼歝rash, 鍩轟簬榪滅▼璋冭瘯鏂瑰紡, 鎵浠ユц兘鐣ヤ綆.

    RemDebug

    娌℃湁IDE, 綰懡浠よ鏂瑰紡璋冭瘯鍣? 浣嗗洜涓虹畝鍗? 鎵浠ュ彲浠ュ弬鑰冨悗鍐欎竴涓嚜宸辯殑紼嬪簭鍐呭緩璋冭瘯鍣?/p>

    Babe Lua

    鎶婅繖璐ф斁鍦ㄦ渶鍚庢槸鏈夊師鍥犵殑, 榪樿寰楅偅鍙ヨ佽瘽: 鑰佸涓寮婧? 鎴戜滑灝辨湁鑷富鐮斿彂浜? 瀵圭殑, 榪欒揣涓瀹氭槸鍙傝冧簡Decoda鐨勪唬鐮佸悗鎼炲嚭涓獀s鐨勬彃浠舵潵, 铏界劧涓嶆敹璐? 浣嗘槸涓嶆彁涓嬪弬鑰冨璞$殑琛屼負榪樻槸鍊煎緱鎵規枟鐨? 榪欒揣鍦ㄤ腑鏂囧崥瀹笂璇? 涓嶆敮鎸佹寕鎺ュ埌榪涚▼(Decoda鏀寔), 涓嶆敮鎸?4浣嶈皟璇?LuaStudio鏀寔), 璋冭瘯30~50嬈″伓灝旀寕1鍒?嬈? 鍝? 姣曠珶鍙槸浠g爜鎼繍宸? 涓嶇敓浜т唬鐮?

    榪欒揣瑁呬笂, 鑳界敤, 璋?.2鏄笉琛岀殑, 5.1姣擠ecoda鏂逛究鐐? 姣曠珶vs鏀寔鎮誕鏄劇ず鍙橀噺.

     

    璇翠簡閭d箞澶? 鍏跺疄瀵逛簬lua5.2鐗堟湰鐨勮皟璇? 榪樻槸娌℃湁鍏嶈垂鐨勬瘮杈冨悎閫傜殑鏂規, 濡傛灉瀹炲湪鎯寵皟璇? 榪樻槸鍙互鍙傝冧笅RemDebug鐨勫師鐞嗗強lua瀹樻柟璋冭瘯鏂囨。, 鑷繁閫氳繃c api璋冪敤鍐欎竴濂楅傚悎鑷繁鐨勮繙紼嬭皟璇曞伐鍏? 鍏跺疄娌℃湁澶氬鏉? 浣嗘繪瘮涓嶈皟璇曠殑濂?img class="wlEmoticon wlEmoticon-smile" style="border-top-style: none; border-bottom-style: none; border-right-style: none; border-left-style: none" alt="寰瑧" src="http://m.shnenglu.com/images/cppblog_com/sunicdavy/Windows-Live-Writer/lua_D2A5/wlEmoticon-smile_2.png">



    ]]>
    紼嬪簭寮傚父VC璋冭瘯鍣ㄦ棤娉曞畾浣嶇殑澶勭悊http://m.shnenglu.com/sunicdavy/archive/2013/06/27/201339.html鎴橀瓊灝忕瓚鎴橀瓊灝忕瓚Thu, 27 Jun 2013 03:05:00 GMThttp://m.shnenglu.com/sunicdavy/archive/2013/06/27/201339.htmlhttp://m.shnenglu.com/sunicdavy/comments/201339.htmlhttp://m.shnenglu.com/sunicdavy/archive/2013/06/27/201339.html#Feedback0http://m.shnenglu.com/sunicdavy/comments/commentRss/201339.htmlhttp://m.shnenglu.com/sunicdavy/services/trackbacks/201339.html鏈榪戣皟璇曠▼搴忓彂鐜扮┖鎸囬拡鑰佹棤娉曞畾浣? 浣跨敤涓涓渶綆鍗曠殑main鍑芥暟鍋氱┖鎸囬拡媯鏌ヤ篃涓鏍? 鍏蜂綋鐥囩姸瑙佸浘

    image

    pdb鍔犺澆鏄甯哥殑, 浣嗘槸鍫嗘爤娌℃樉紺哄姝ょ畝鍗曠殑絀烘寚閽堣闂綅緗? Google浜嗕互涓?/p>

    http://blogs.msdn.com/b/debugger/archive/2010/05/12/visual-studio-debugger-fails-to-catch-unhandled-exception-for-a-windows-form-or-wpf-application.aspx

    瑙e喅鏂規硶: Debug->Exception涓皢鎵鏈夊紓甯稿嬀閫夊嵆鍙?/p>

     

    涓嶇煡閬撳摢閲岀殑璁劇疆瀵艱嚧濡傛璇″紓鐨勯棶棰? 瀹崇殑鎴戦噸瑁呬竴嬈?.



    ]]>
    瀵艱嚧闂鐨勬牴婧恈ocos2dx鐨勫鉤鍙板疄鐜板ぇ鍧?/title><link>http://m.shnenglu.com/sunicdavy/archive/2013/06/14/201007.html</link><dc:creator>鎴橀瓊灝忕瓚</dc:creator><author>鎴橀瓊灝忕瓚</author><pubDate>Fri, 14 Jun 2013 09:15:00 GMT</pubDate><guid>http://m.shnenglu.com/sunicdavy/archive/2013/06/14/201007.html</guid><wfw:comment>http://m.shnenglu.com/sunicdavy/comments/201007.html</wfw:comment><comments>http://m.shnenglu.com/sunicdavy/archive/2013/06/14/201007.html#Feedback</comments><slash:comments>5</slash:comments><wfw:commentRss>http://m.shnenglu.com/sunicdavy/comments/commentRss/201007.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/sunicdavy/services/trackbacks/201007.html</trackback:ping><description><![CDATA[<p>鏈榪戝皢cocos2dx鐨勭▼搴忕Щ妞嶅埌Android涓? 鏌愰樁孌電獊鐒跺彂鐜板紑濮嬮棯閫. 鏃ュ織鏂瑰紡璺熶簡寰堜箙, 鍙戠幇鏈夊唴瀛樿淇敼. 鍥犱負涓嶈兘鍍廣C閭f牱鏈夊唴瀛樻柇鐐? 鍙湁闈犳棩蹇楃戶緇窡韙? 緇曚簡寰堜箙, 緇堜簬鍙戠幇涓涓棶棰?/p> <p>CCApplication::sharedApplication()->run(); 鍦╓indows涓嬮櫎浜嗗垵濮嬪寲鍥炶皟澶? 榪樻湁Windows騫沖彴鐗規畩鐨勬秷鎭驚鐜? 鏃㈢劧鏄驚鐜? 榪欎釜run鍑芥暟浼氫竴鐩撮樆濉炲埌紼嬪簭閫鍑? 鍥犳鎴戣嚜鐒剁殑鍦╮un鍚庢坊鍔犺嚜宸辯殑璧勬簮鍗歌澆</p> <p>鎹㈠埌Android涓婂憿CCApplication::sharedApplication()->run();鐨勫疄鐜板彉浜? 鐢變簬Android涓婃病鏈塛indows鐨勬秷鎭驚鐜? 鎵鏈変簨浠墮兘鏄氳繃java鏂瑰紡鐨勪簨浠墮氱煡. 鍥犳CCApplication::sharedApplication()->run();鍙樻垚浜嗛潪闃誨, 鍙槸鎴戝湪run鍚庢坊鍔犱簡璧勬簮鍗歌澆. 緇撴灉瀵艱嚧緋葷粺鍒氬垵濮嬪寲灝卞嵏杞戒簡璧勬簮, 鍐呭瓨鐩存帴涓嶅彲鐢? 瀵艱嚧鍚庨潰cocos2dx鐨凙PI閮ㄥ垎浣跨敤鏃犻棶棰? 鑰岃嚜宸卞紩鎿庣殑API璋冪敤闂.</p> <p>cocos2dx鐨勮繖涓猺un鍑芥暟鍛藉悕鏈変弗閲嶉棶棰?. 琚潙浜嗗ソ涔? 榪樹竴鐩存鐤慛DK鍐呭瓨綆$悊鏄惁鏈夌壒孌婁箣澶? 孌婁笉鐭?.</p><img src ="http://m.shnenglu.com/sunicdavy/aggbug/201007.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/sunicdavy/" target="_blank">鎴橀瓊灝忕瓚</a> 2013-06-14 17:15 <a href="http://m.shnenglu.com/sunicdavy/archive/2013/06/14/201007.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鏈渚挎嵎鐨凙ndroid鐜閮ㄧ講cocos2dx紼嬪簭http://m.shnenglu.com/sunicdavy/archive/2013/06/09/200904.html鎴橀瓊灝忕瓚鎴橀瓊灝忕瓚Sun, 09 Jun 2013 09:55:00 GMThttp://m.shnenglu.com/sunicdavy/archive/2013/06/09/200904.htmlhttp://m.shnenglu.com/sunicdavy/comments/200904.htmlhttp://m.shnenglu.com/sunicdavy/archive/2013/06/09/200904.html#Feedback0http://m.shnenglu.com/sunicdavy/comments/commentRss/200904.htmlhttp://m.shnenglu.com/sunicdavy/services/trackbacks/200904.html鏈枃鏁翠釜閮ㄧ講榪囩▼鏃犻渶涓嬭澆鍙婂畨瑁呬嬌鐢–ygwin鐜錛?浠ヤ笅閮ㄧ講榪囩▼闇瑕佺敤鍒扮殑紼嬪簭鍙婄増鏈?

    璇鋒敞鎰忎笅杞藉搴斾綘緋葷粺鐨勭増鏈? 64浣嶇郴緇熻淇濊瘉鍚庢枃鍏ㄧ郴浣跨敤64浣嶇▼搴? 浠ュ厤閬囧埌涓嶅繀瑕佺殑楹葷儲

    1.JDK&JRE       JAVA榪愯鏃跺強寮鍙戝寘

    2.ADT               鏄疎clipse鐨勪竴涓彃浠訛紝榪欎竴姝ユ槸涓轟簡綆$悊瀹夊崜寮鍙戝簱

    http://developer.android.com/sdk/index.html

    浣滀負鏂版墜, 璇蜂笅杞紸DT Bundle For Windows, 榪欎釜鐗堟湰宸茬粡鍖呭惈

    ADK錛堝畨鍗撳紑鍙戝寘錛? CDT錛圗clipse鐨凜/C++寮鍙戞彃浠訛級鍙婂搴旂殑Eclipse, 鍙互閬垮厤絎竴嬈¢儴緗插嚭鐜扮殑鍚勭鐑﹀績!

    3.NDK              鍙湁ADT宸茬粡鍙互榪愯鏅氱殑Andriod紼嬪簭錛屼絾鏄鏋滈渶瑕佺紪璇慍/C++紼嬪簭錛?榪橀渶瑕丯DK

    http://developer.android.com/tools/sdk/ndk/index.html

    4. cocos2dx 2.0.4鐗堟湰

     

    鍑嗗SDK API

    涓嬭澆濂紸DT鍚庤В鍘嬶紝 鏈夊涓嬬洰褰?/p>

    eclipse\      <- 寮鍙戠幆澧?/p>

    sdk\           <- Andriod SDK

    SDK Manager.exe     <-- Android寮鍙戝寘綆$悊鍣? 鐢變簬Andriod鐗堟湰杈冨, 鎵浠ユ綆$悊鍣ㄥ彲浠ユ柟渚垮紑鍙戣呴夋嫨閮ㄧ講鐩爣鏈哄櫒

    鎵撳紑SDK Manager鍦ˋndroid 2.2(API 8)閲岀殑 SDK Platform, Google APIs鍓嶆墦鍕? 鐐瑰嚮鍙充笅瑙掔殑Instal packages

    濡傛灉鎰熻涓嬭澆閫熷害鎱? 鍙互縐繪榪欓噷http://my.oschina.net/heguangdong/blog/17443, 閫夋嫨Andriod紱葷嚎涓嬭澆

    榪欓噷鏄笅杞介摼鎺?/p>

    http://dl-ssl.google.com/android/repository/google_apis-8_r02.zip

    http://dl-ssl.google.com/android/repository/android-2.2_r02-windows.zip

    https://dl-ssl.google.com/android/repository/usb_driver_r04-windows.zip

    鎶奱ndroid寮澶寸殑鏂囦歡瑙e帇鍒皃latforms鐩綍涓?/p>

    鎶奼oole_apis寮澶寸殑鏂囦歡瑙e帇鍒癮dd-ons鐩綍涓?/p>

    鎶妘sb_driver_r03-windows.zip瑙e帇鍒皍sb_driver鐩綍涓嬨?/p>

    Eclipse瀵煎叆宸ョ▼

    鎵撳紑Eclipse

    瀵煎叆Cocos2dx渚嬪瓙宸ョ▼:

    Eclipse涓璅ile->New->Other...閫夋嫨Andriod Project from Existing Code

    鍦↖mport Projects鐨凴oot Directory涓鍏:\Develop\RevWar\sdk\cocos2d-2.0-x-2.0.4\samples\HelloCpp\proj.android\

    娉ㄦ剰, 涓嶈閫変腑 Copy project into workspace, 鍚﹀垯璺緞緙栦貢寰堥毦緙栬瘧鎴愬姛

     

    瀵煎叆cocos2dx鐨刯ava妗嗘灦

    鍦╯rc鐩綍涓璶ew package, 杈撳叆org.cocos2dx.lib, 鍦╫rg.cocos2dx.lib鐨刾ackage涓偣Import-> FileSystem

    閫変腑鐩綍D:\Develop\RevWar\sdk\cocos2d-2.0-x-2.0.4\cocos2dx\platform\android\java\src\org\cocos2dx\lib\, 鐐歸夋墍鏈塲ava鏂囦歡

    宸ョ▼Properties->Builder->New->Program

    鍦∕ain鏍囩涓~鍐?/strong>

    濉啓NDK緙栬瘧鍛戒護琛?D:\Develop\android-ndk-r8e\ndk-build.cmd

    鐐瑰嚮Browser Workspace閫変腑褰撳墠宸ョ▼,鍑虹幇${workspace_loc:/HelloCpp}

    鍒囨崲鍒癊nvironment鏍囩涓~鍐?/strong>

    鏂板緩NDK_MODULE_PATH 濉啓D:\Develop\RevWar\sdk\cocos2d-2.0-x-2.0.4\;D:\Develop\RevWar\sdk\cocos2d-2.0-x-2.0.4\cocos2dx\platform\third_party\android\prebuilt\

    淇敼cocos2dx鐨凙ndroid.mk, diff濡備笅

    @@ -153,6 +153,7 @@

    LOCAL_WHOLE_STATIC_LIBRARIES += cocos_jpeg_static

    LOCAL_WHOLE_STATIC_LIBRARIES += cocos_libxml2_static

    LOCAL_WHOLE_STATIC_LIBRARIES += cocos_libtiff_static

    +LOCAL_WHOLE_STATIC_LIBRARIES += cocosdenshion_static

    # define the macro to compile through support/zip_support/ioapi.c              

    LOCAL_CFLAGS := -DUSE_FILE32API

    @@ -164,3 +165,4 @@

    $(call import-module,libpng)

    $(call import-module,libxml2)

    $(call import-module,libtiff)

    +$(call import-module,CocosDenshion/android)

    F&Q

    andriod-8闂

    淇敼D:\Develop\RevWar\sdk\cocos2d-2.0-x-2.0.4cocos2dx\platform\android\java\project.properties涓殑target=android-8鏀規垚浣犻渶瑕佺殑鐗堟湰

    resources.ap_ does not exist

    assert鐩綍涓湁璧勬簮鍑洪棶棰? 鎺掓煡鍗沖彲

    渚嬪: cocos2d-2.0-x-2.0.4\samples\TestCpp\proj.android\assets\Images\*.pvr.gz

    鍚姩Android妯℃嫙鍣ㄦ椂鐨凢ailed to allocate memory: 8闂

    璋冩暣鍐呭瓨鍊?璇鋒眰鍐呭瓨澶ぇ瀵艱嚧

    api鐗堟湰榪囦綆瀵艱嚧JAVA Symbol鏈畾涔夐棶棰?/strong>

    setEGLContextClientVersion undefined

    api8(andriod 2.2)鍚庣殑鐗堟湰, 鎵嶆敮鎸乷penGL es 2.0

    鑷繁鍋氬伐紼嬮亣鍒扮殑闂D:\Develop\RevWar\sdk\cocos2d-2.0-x-2.0.4\/cocos2dx/platform/android/jni/JniHelper.h:28:18: fatal error: string: No such file or directory

    灝哻ocos2dx渚嬪瓙涓殑Application.mk鎷瘋繃鏉? 淇敼涓嬪唴閮ㄥ悕縐板嵆鍙?/p>

    璋冭瘯璇峰敖閲忎嬌鐢ㄧ湡鏈? 妯℃嫙鍣ㄩ熷害寰堟參

    灝忕背2榛樿鍙兘綆$悊鏂囦歡, 鏃犳硶鐢╝db 榪炴帴, 鍥犳闇瑕佸畨瑁呴┍鍔? USB椹卞姩鐩存帴鍦ㄦ彃鍏ョ數鑴戝悗鐨勮櫄鎷熺洏閲屾壘.. 榪欎釜澶潙浜?.

    淇濊瘉姣忔閮借兘閮ㄧ講鏈鏂扮殑紼嬪簭

    璇鋒墽琛屾瘡嬈lean, Build project, Debug.  鐪熸満涓婂湪闇瑕佹椂, 浼氬脊鍑哄畨瑁?..

    Android鍚姩鏃ュ織

    甯︽湁ADT鐨凟clipse涓湁涓涓猯ogcat紿楀彛, 閲岄潰鏈夌郴緇熷強紼嬪簭鏈韓鐨勬棩蹇? 鍙互鍋氳繃婊?鏂逛究媯鏌ラ棶棰? 濡傞渶鑷繁鎵撴棩蹇? 鍙互浣跨敤cocos2dx涓殑LOGD瀹忔潵鍋? 鍘熷瀷鏄痏_android_log_print(ANDROID_LOG_DEBUG,LOG_TAG,__VA_ARGS__)

     

    Remark

    娣誨姞assert鍚? F5鍒鋒柊鍚庡啀緙栬瘧
    NDK build鏃?榛樿浠庡伐紼嬬殑jni鐩綍寮濮?

    Andriod.mk鐨刬mport 鍘熷垯$(call import-module,妯″潡鍚? 榪欓噷鐨勬ā鍧楀悕蹇呴』涓庣洰褰曞悕, 妯″潡make file涓殑鍚嶇О鎶ョ焊涓鑷?

    鍙傝冩枃绔?/strong>

    http://www.cnblogs.com/ybgame/archive/2012/06/07/2540693.html

    鍙戞枃鏃? Andriod Studio宸茬粡鍙戝竷浜嗕竴孌墊椂闂? 铏界劧鏄祴璇曠増, 浣嗗皢浠h〃鏈潵鏇存柟渚跨殑Andriod鍙戝竷宸ュ叿



    ]]>
    鎹曡幏Linux孌甸敊璇?Segment fault)騫朵笖鎵撳嵃閿欒鍫嗘爤http://m.shnenglu.com/sunicdavy/archive/2012/12/29/196809.html鎴橀瓊灝忕瓚鎴橀瓊灝忕瓚Sat, 29 Dec 2012 09:53:00 GMThttp://m.shnenglu.com/sunicdavy/archive/2012/12/29/196809.htmlhttp://m.shnenglu.com/sunicdavy/comments/196809.htmlhttp://m.shnenglu.com/sunicdavy/archive/2012/12/29/196809.html#Feedback3http://m.shnenglu.com/sunicdavy/comments/commentRss/196809.htmlhttp://m.shnenglu.com/sunicdavy/services/trackbacks/196809.htmlLinux涓婅窇鏈嶅姟鍣ㄥ鏋滈亣鍒扮▼搴忓穿婧冩槸涓浠跺緢鑻︽伡鐨勪簨鎯? 鍐嶇鍒伴噸鐜板緢闅劇殑BUG, 浼拌鍙兘閫氳繃浼犵粺鐨勬帓鏌ユ柟娉曡繘琛?

    鍦ㄧ紪鍐欐湰鏂囧墠, 絎旇呬嬌鐢ㄨ繃璇稿libunwind絳夊簱榪涜閿欒鏃跺爢鏍堟墦鍗? 浣嗘槸鍏舵湰韜敱浜庨渶瑕佸紩鐢ㄧ涓夋柟搴? 浣跨敤榪樻槸紼嶅井楹葷儲.

    緇忚繃Google鍚? 灞呯劧鎵懼埌涓綃?a >濂芥枃, 鍏墮氳繃鎹曡幏SIGSEGV淇″彿, 騫惰揩浣跨▼搴忚繘鍏db璋冭瘯闃舵, 鍒╃敤gdb寮哄ぇ鐨勮皟璇曞姛鑳藉彲浠ヨ繘琛屽悇縐嶉敊璇窡韙? 姝ゆ硶宸蹭笌Windows涓嬬▼搴忓穿婧冨悗寮瑰嚭VC璋冭瘯鍑犱箮鎺ヨ繎.

    鎴戝湪姝ゆ枃鍩虹涓? 鎵╁睍浜嗗叾閫氱敤鎬у強渚垮埄鎬?/p>

    1. 浣跨敤gdb鐨?-ex鍙傛暟, 鍦ㄦ寕鎺ョ▼搴忓悗, 鎵цbt鎸囦護鎵撳嚭紼嬪簭鍫嗘爤

    2. 灝嗕俊鎭噸瀹氬悜鍒拌嚜瀹氫箟鐨勬枃浠?鍦ㄥ榪涚▼閮介渶瑕佽繘琛屽悗鍙拌緭鍑烘椂甯︽潵鏇村ぇ鐨勭伒媧繪? 鍚屾椂涔熻В鍐充簡gdb鍙兘鍦ㄥ墠鍙拌皟璇曠殑闂

    浠g爜濡備笅

    #include <stdio.h>
    #include <stdlib.h>
    #include <signal.h>
    #include <string.h>
    
    void dump(int signo)
    {
            char buf[1024];
            char cmd[1024];
            FILE *fh;
    
            snprintf(buf, sizeof(buf), "/proc/%d/cmdline", getpid());
            if(!(fh = fopen(buf, "r")))
                    exit(0);
            if(!fgets(buf, sizeof(buf), fh))
                    exit(0);
            fclose(fh);
            if(buf[strlen(buf) - 1] == '/n')
                    buf[strlen(buf) - 1] = '/0';
            snprintf(cmd, sizeof(cmd), "gdb %s %d -ex=bt > ./a.txt", buf, getpid());
            system(cmd);
    
            exit(0);
    }

    鍦ㄦ湇鍔″櫒寮鍚椂,娣誨姞 signal(SIGSEGV, &dump ); 榪涜淇″彿澶勭悊鎸傛帴鍗沖彲

     

     

    寮曠敤: http://blog.csdn.net/kakaka2011/article/details/6597857  浣滆? kakaka2011



    ]]>
    璁¬C璋冭瘯鍣ㄦ紜樉紺篣TF-8瀛楃涓?/title><link>http://m.shnenglu.com/sunicdavy/archive/2012/02/14/165566.html</link><dc:creator>鎴橀瓊灝忕瓚</dc:creator><author>鎴橀瓊灝忕瓚</author><pubDate>Tue, 14 Feb 2012 07:21:00 GMT</pubDate><guid>http://m.shnenglu.com/sunicdavy/archive/2012/02/14/165566.html</guid><wfw:comment>http://m.shnenglu.com/sunicdavy/comments/165566.html</wfw:comment><comments>http://m.shnenglu.com/sunicdavy/archive/2012/02/14/165566.html#Feedback</comments><slash:comments>4</slash:comments><wfw:commentRss>http://m.shnenglu.com/sunicdavy/comments/commentRss/165566.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/sunicdavy/services/trackbacks/165566.html</trackback:ping><description><![CDATA[<p>榛樿鐨? VC璋冭瘯鍣ㄥ彧鑳芥甯告樉紺篈NSI瀛楃涓插強UNICODE瀛楃涓? 鑰孶TF-8瀛楃涓插強鍏朵粬鏍煎紡鍒欐棤娉曟樉紺?/p> <p>榪欓噷鏃犻渶緙栧啓鎻掍歡鍙婁慨鏀歸厤緗枃浠?鍙渶瑕佸皢瑕佹樉紺虹殑瀛楃涓叉媺鍒癢atch涓?騫跺湪鍙橀噺鍚庨潰娣誨姞,s8鍗沖彲鏄劇ず</p> <p><a href="http://m.shnenglu.com/images/cppblog_com/sunicdavy/Windows-Live-Writer/165611ed03f8_D62F/image_4.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://m.shnenglu.com/images/cppblog_com/sunicdavy/Windows-Live-Writer/165611ed03f8_D62F/image_thumb_1.png" width="233" height="42"></a> --> <a href="http://m.shnenglu.com/images/cppblog_com/sunicdavy/Windows-Live-Writer/165611ed03f8_D62F/image_2.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://m.shnenglu.com/images/cppblog_com/sunicdavy/Windows-Live-Writer/165611ed03f8_D62F/image_thumb.png" width="173" height="51"></a></p> <p>鍚屾牱綾誨瀷鐨勫姛鑳戒篃搴旇寰堢啛鎮?/p> <p>,鏁板瓧  灝嗗彉閲忔媶鍒嗕負鏁扮粍鏄劇ず, 鏁板瓧鏄鏄劇ず澶氬皯浣? 姝ゆ硶瀵筩onst char*榪欑被鍘熷瀛楃涓查潪甯告湁鐢?/p> <p>,x 16榪涘埗鏌ョ湅</p> <p>,hr  鏌ョ湅Windows HRESULT瑙i噴</p> <p>,wm Windows娑堟伅,渚嬪0x0010, wm 鏄劇ず WM_CLOSE</p><img src ="http://m.shnenglu.com/sunicdavy/aggbug/165566.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/sunicdavy/" target="_blank">鎴橀瓊灝忕瓚</a> 2012-02-14 15:21 <a href="http://m.shnenglu.com/sunicdavy/archive/2012/02/14/165566.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>VC涓嬌鐢⊿etThreadName寮曡搗鐨勭嚎紼嬫閿?/title><link>http://m.shnenglu.com/sunicdavy/archive/2011/10/12/158109.html</link><dc:creator>鎴橀瓊灝忕瓚</dc:creator><author>鎴橀瓊灝忕瓚</author><pubDate>Wed, 12 Oct 2011 01:50:00 GMT</pubDate><guid>http://m.shnenglu.com/sunicdavy/archive/2011/10/12/158109.html</guid><wfw:comment>http://m.shnenglu.com/sunicdavy/comments/158109.html</wfw:comment><comments>http://m.shnenglu.com/sunicdavy/archive/2011/10/12/158109.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://m.shnenglu.com/sunicdavy/comments/commentRss/158109.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/sunicdavy/services/trackbacks/158109.html</trackback:ping><description><![CDATA[<p>鎴戝湪宸ョ▼閲屼嬌鐢ㄤ互涓嬪嚱鏁扮粰綰跨▼璁劇疆涓涓柟渚胯皟璇曠殑鍚嶇О</p> <div id="hvzpftn" class="csharpcode"><pre class="alt"> typedef <span id="hvzpftn" class="kwrd">struct</span> tagTHREADNAME_INFO</pre><pre> {</pre><pre class="alt"> DWORD dwType; <span id="hvzpftn" class="rem">// must be 0x1000</span></pre><pre> LPCSTR szName; <span id="hvzpftn" class="rem">// pointer to name (in user addr space)</span></pre><pre class="alt"> DWORD dwThreadID; <span id="hvzpftn" class="rem">// thread ID (-1=caller thread)</span></pre><pre> DWORD dwFlags; <span id="hvzpftn" class="rem">// reserved for future use, must be zero</span></pre><pre class="alt"> } THREADNAME_INFO;</pre><pre> </pre><pre class="alt"> <span id="hvzpftn" class="kwrd">void</span> SetThreadName( DWORD dwThreadID, LPCSTR szThreadName )</pre><pre> {</pre><pre class="alt"> THREADNAME_INFO info;</pre><pre> info.dwType = 0x1000;</pre><pre class="alt"> info.szName = szThreadName;</pre><pre> info.dwThreadID = dwThreadID;</pre><pre class="alt"> info.dwFlags = 0;</pre><pre> </pre><pre class="alt"> <span id="hvzpftn" class="rem">// Visit http://m.shnenglu.com/sunicdavy for original article</span></pre><pre> __try</pre><pre class="alt"> {</pre><pre> RaiseException( 0x406D1388, 0, <span id="hvzpftn" class="kwrd">sizeof</span>(info)/<span id="hvzpftn" class="kwrd">sizeof</span>(DWORD), (DWORD*)&info );</pre><pre class="alt"> }</pre><pre> __except(EXCEPTION_CONTINUE_EXECUTION)</pre><pre class="alt"> {</pre><pre> <span id="hvzpftn" class="kwrd">int</span> a =1;</pre><pre class="alt"> }</pre><pre> }</pre></div> <style type="text/css">.csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } </style> <style type="text/css">.csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } </style> <p>浣跨敤鏈熼棿涓鐩存甯? 闅忕潃宸ョ▼闇姹傚彉鍖?鎴戦渶瑕?strong>棰戠箒鐨?/strong>灝嗕竴涓鍛藉悕鐨勭嚎紼嬪垱寤哄伐浣滀竴孌墊椂闂村悗<strong>椹笂緇撴潫閲婃斁璧勬簮騫墮噸鏂板垱寤?/strong>,鍑虹幇浜嗘閿侀棶棰?/p> <p>姝婚攣鎬繪槸鍙戠敓鍦ㄤ富綰跨▼鐨凷leep鎴栬呮槸SetEvent涓や釜WindowsAPI鍑芥暟. 鑰屼笖浠呬粎鍦╒isual Studio 2008閲岃皟璇曟椂浼氬彂鐢熸閿?鑴辯璋冭瘯鐜涓鍒囨甯?</p> <p>鎴戝紑濮嬫墦鏃ュ織璋冭瘯, 緇撴灉鍙戠幇姝婚攣鍓嶈兘澶熸甯稿垱寤虹嚎紼?浣嗘槸綰跨▼鍑芥暟鏍規湰娌℃湁璋冪敤榪涘叆.涔嬪悗灝卞湪涓葷嚎紼婼leep澶勬閿佷簡.</p> <p>鐢變簬SetThreadName娌℃湁浣跨敤姝h鐨凙PI鎺ュ彛,鑰屾槸浣跨敤鎶涘紓甯告柟寮? 鑰屼笖綰跨▼鍚嶇О搴旇鍙湪Visual Studio IDE涓墠鑳芥樉紺? MSDN瀵筊aiseException鐨勬弿榪伴噷涔熸湁璇存槑鍙互浣跨敤<b>WaitForDebugEvent</b>鎺ユ敹搴旂敤紼嬪簭鎶涘緱寮傚父.鍥犳鍙互鎺ㄦ柇鏄疭etThreadName閫犳垚鐨勯棶棰? 灞忚斀SetThreadName,嫻嬭瘯閫氳繃</p><img src ="http://m.shnenglu.com/sunicdavy/aggbug/158109.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/sunicdavy/" target="_blank">鎴橀瓊灝忕瓚</a> 2011-10-12 09:50 <a href="http://m.shnenglu.com/sunicdavy/archive/2011/10/12/158109.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>[鍘熷垱]鎬庢牱鑷姩鍚姩VC璋冭瘯鍣ㄨ皟璇曡鍙﹀涓涓▼搴忓惎鍔ㄧ殑紼嬪簭http://m.shnenglu.com/sunicdavy/archive/2010/11/16/133823.html鎴橀瓊灝忕瓚鎴橀瓊灝忕瓚Tue, 16 Nov 2010 13:22:00 GMThttp://m.shnenglu.com/sunicdavy/archive/2010/11/16/133823.htmlhttp://m.shnenglu.com/sunicdavy/comments/133823.htmlhttp://m.shnenglu.com/sunicdavy/archive/2010/11/16/133823.html#Feedback4http://m.shnenglu.com/sunicdavy/comments/commentRss/133823.htmlhttp://m.shnenglu.com/sunicdavy/services/trackbacks/133823.html璋冭瘯涓諱細閬囧埌榪欐牱鐨勬儏鍐碉紝姣斿錛岄渶瑕佽皟璇曚竴涓鍙﹀涓涓繘紼嬪惎鍔ㄧ殑紼嬪簭銆傛渶綆鍗曠殑鏂規硶鑾繃浜庣洿鎺ュ湪IDE涓瑼ttach鍒拌繘紼嬶紝浣嗘槸榪欐牱鐨勬柟娉曞仛涓嬈¤繕琛屻傝鏄竴鐩撮渶瑕佽皟璇曪紝緙栬瘧鍚庨渶瑕佸啀璋冭瘯錛屽氨浼氳浣犳姄鐙傘?/p>

    騫蟲椂瀹夎鏈塚C IDE鐨勬満鍣ㄤ竴瀹氫細紕板埌榪欐牱鐨勬儏鍐碉細濡傛灉紼嬪簭鏈塩rash錛屼細寮瑰嚭涓涓狫IT鐨勮皟璇曞璇濇錛岃闂嬌鐢ㄤ綍縐嶈皟璇曞櫒榪涜璋冭瘯銆傝繖縐嶆儏鍐靛悓鏍蜂細鍑虹幇鍦ㄤ嬌鐢╠ump鏂囦歡鏃躲傝繖涓璇濇涔熸槸鎴戜滑浠婂ぉ闇瑕佺敤鍒扮殑銆?/p>

    濡傛灉闇瑕佽皟璇曚竴涓鍙﹀榪涚▼鍚姩鐨勮繘紼嬶紝閭d箞闇瑕佽榪欎釜琚惎鍔ㄧ殑綰跨▼鑳藉惎鍔ㄨ皟璇曞櫒錛屾柟娉曞涓嬶細

    鍋囧畾鎴戜滑闇瑕佽皟璇曠殑搴旂敤紼嬪簭鍚嶇О涓簃yapp.exe

     

    1. 鎵撳紑娉ㄥ唽琛?/p>

    2. 鍦℉KEY_LOCAL_MACHINE\Software\Microsoftware\Windows NT\CurrentVersion\Image File Execution Options涓鎵緈yapp.exe鏂囦歡澶?/p>

    3. 濡傛灉榪欎釜鏂囦歡澶逛笉瀛樺湪錛岄偅涔堝氨鏂板緩涓涓紝渚嬪錛歮yapp.exe

    4. 鍦ㄦ枃浠跺す閲屾柊寤轟竴涓瓧絎︿覆閿紝鍚嶇О涓篸ebugger錛屽間負vsjitdebugger.exe

    5. 濡傛灉浣跨敤鐨勪笉鏄疺C璋冭瘯鍣紝閭d箞闇瑕佸湪鐜鍙橀噺涓坊鍔犺繖涓猠xe鐨勫惎鍔ㄨ礬寰?/p>

     

    榪愯浣犻渶瑕佽璋冭瘯鐨勭▼搴忚瘯璇曞惂錛岀埥浜嗗惂錛?/p>

     

    杞澆璇鋒敞鏄庢鏂囨潵鑷?鎴橀瓊灝忕瓚鍗氬 http://m.shnenglu.com/sunicdavy



    ]]>
    淇敼綰跨▼鍚嶇О,騫跺湪VC璋冭瘯鍣ㄤ腑鏄劇ずhttp://m.shnenglu.com/sunicdavy/archive/2010/05/04/114342.html鎴橀瓊灝忕瓚鎴橀瓊灝忕瓚Tue, 04 May 2010 07:28:00 GMThttp://m.shnenglu.com/sunicdavy/archive/2010/05/04/114342.htmlhttp://m.shnenglu.com/sunicdavy/comments/114342.htmlhttp://m.shnenglu.com/sunicdavy/archive/2010/05/04/114342.html#Feedback0http://m.shnenglu.com/sunicdavy/comments/commentRss/114342.htmlhttp://m.shnenglu.com/sunicdavy/services/trackbacks/114342.html
    #define MS_VC_EXCEPTION 0x406d1388
     
    typedef struct tagTHREADNAME_INFO
    {
        DWORD dwType;        // must be 0x1000
        LPCSTR szName;       // pointer to name (in same addr space)
        DWORD dwThreadID;    // thread ID (-1 caller thread)
        DWORD dwFlags;       // reserved for future use, most be zero
    } THREADNAME_INFO;
     
    void SetThreadName(DWORD dwThreadID, LPCTSTR szThreadName)
    {
        THREADNAME_INFO info;
        info.dwType = 0x1000;
        info.szName = szThreadName;
        info.dwThreadID = dwThreadID;
        info.dwFlags = 0;
     
        __try
        {
            RaiseException(MS_VC_EXCEPTION, 0, sizeof(info) / sizeof(DWORD),
    (DWORD *)&info);
        }
        except (EXCEPTION_CONTINUE_EXECUTION)
        {
        }
    }

     

    綰跨▼鍚嶇О闄愬埗鍦?涓狝NSI瀛楃鍐?璋冪敤榪欎釜鍑芥暟鍚?灝嗚Е鍙戜竴涓皟璇曞櫒寮傚父,VC璋冭瘯鍣ㄥ皢浼氭妸瀛楃涓茶緗負綰跨▼鍚嶇О,騫跺湪璋冭瘯鍣ㄤ腑鏄劇ず



    ]]>
    CRT鏈瀯閫犲叏灞瀵硅薄闂http://m.shnenglu.com/sunicdavy/archive/2010/04/23/113358.html鎴橀瓊灝忕瓚鎴橀瓊灝忕瓚Fri, 23 Apr 2010 09:47:00 GMThttp://m.shnenglu.com/sunicdavy/archive/2010/04/23/113358.htmlhttp://m.shnenglu.com/sunicdavy/comments/113358.htmlhttp://m.shnenglu.com/sunicdavy/archive/2010/04/23/113358.html#Feedback6http://m.shnenglu.com/sunicdavy/comments/commentRss/113358.htmlhttp://m.shnenglu.com/sunicdavy/services/trackbacks/113358.html寮曟搸涓殑姣忎釜宸ョ▼鍧囦互闈欐佸簱鏂瑰紡閾炬帴鍒版渶鍚庣殑exe. 浠g爜涓寘鍚湁闈欐佺被鎴愬憳,絎竴嬈¤繍琛屾甯?鍚庨潰涓嶇煡浠涔堝師鍥? 榪欎簺闈欐佺被鎴愬憳涓嶄細琚垵濮嬪寲, 鍦?crtexec.c 鐨凜RT 鍒濆鍖栧叏灞綾繪垚鍛樺嚱鏁?/p>

    static void __cdecl _initterm (
    #endif  /* CRTDLL */
            _PVFV * pfbegin,
            _PVFV * pfend
            )
    {
            /*
             * walk the table of function pointers from the bottom up, until
             * the end is encountered.  Do not skip the first entry.  The initial
             * value of pfbegin points to the first valid entry.  Do not try to
             * execute what pfend points to.  Only entries before pfend are valid.
             */
            while ( pfbegin < pfend )
            {
                /*
                 * if current table entry is non-NULL, call thru it.
                 */
                if ( *pfbegin != NULL )
                    (**pfbegin)();
                ++pfbegin;
            }
    }

     

     

    榪欎釜鍑芥暟浼氬垵濮嬪寲鎵鏈夐摼鎺ュ埌exe涓殑鍏ㄥ眬鍑芥暟鏋勯? 璺熻釜榪欎釜鍦版柟, 鍙戠幇,鍙湁1涓猯ib涓殑鑳借姝g‘璋冪敤,浣嗘槸鍑洪棶棰樼殑閭d釜lib涓墍鏈夋瀯閫犻兘涓嶈兘琚皟鐢? 灝濊瘯璋冩暣緙栬瘧欏哄簭鏃犳灉

    鍞竴鐨勬柟娉曞彧鏈変慨鏀規灦鏋勪負鍦╳inmain鍐呰繘琛屾瀯閫?/p>

    濡傛灉鏈夎繖鏂歸潰璋冭瘯緇忛獙鐨勫悓瀛﹀彲浠ュ洖甯?璋㈣阿



    ]]>
    C/C++ 璇彞{__asm int 3;} 鑳藉湪VC涓嬬紪璇戠殑榪囦箞錛?/title><link>http://m.shnenglu.com/sunicdavy/archive/2010/02/24/108353.html</link><dc:creator>鎴橀瓊灝忕瓚</dc:creator><author>鎴橀瓊灝忕瓚</author><pubDate>Wed, 24 Feb 2010 09:11:00 GMT</pubDate><guid>http://m.shnenglu.com/sunicdavy/archive/2010/02/24/108353.html</guid><wfw:comment>http://m.shnenglu.com/sunicdavy/comments/108353.html</wfw:comment><comments>http://m.shnenglu.com/sunicdavy/archive/2010/02/24/108353.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://m.shnenglu.com/sunicdavy/comments/commentRss/108353.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/sunicdavy/services/trackbacks/108353.html</trackback:ping><description><![CDATA[<p>浠婂ぉ鍦ㄥ啓涓涓畯鏃跺緇堟姤</p> <p>fatal error C1075: end of file found before the left brace '{' at 'd:\xxx.cpp(49)' was matched</p> <p>媯鏌ユ帓闄や唬鐮侊紝鍘婚櫎浜嗗畯錛岀暀涓嬩簡涓鍙?/p> <p>{__asm int 3;} </p> <p>灝嗗ぇ鎷彿鍘繪帀錛岃兘緙栬瘧鎴愬姛銆傚幓鎺?涔熻兘緙栬瘧鎴愬姛</p> <p>鎴戝氨濂囦簡鎬簡錛屾煡浜哅SDN鏂囨。錛岄噷闈㈡槸榪欎箞鍐欑殑錛?/p> <p>__asm <i>assembly-instruction</i> [ ; ] <p>__asm { <i>assembly-instruction-list</i> } [ ; ] <dl> <dt><i>asm-statement</i>: <dd> <p><b>__asm </b><i>assembly-instruction </i><b>;</b><sub>opt</sub> <p><b>__asm { </b><i>assembly-instruction-list </i><b>};</b><sub>opt</sub></p></dd></dl> <dl> <dt><i>assembly-instruction-list</i>: <dd> <p><i>assembly-instruction</i><b>;</b><sub>opt</sub> <p><i>assembly-instruction</i><b>;</b><i>assembly-instruction-list</i><b>;</b><sub>opt</sub></p></dd></dl> <p>涔熷氨鏄 鍒嗗彿鏄彲閫夌殑錛岃繖涓被浼間簬lua</p> <p>涓嶅姞鍒嗗彿涔熷彲浠ヨ繖鏍峰啓</p><pre>__asm mov al, 2 __asm mov dx, 0xD007 __asm out dx, al</pre><pre> </pre><pre>浜庢槸涔庯紝鎴戞兂榪欐垚浜嗕竴涓猇C鐨刡ug</pre><pre> </pre><pre>緙栬瘧鐜vs2008 c/c++</pre><img src ="http://m.shnenglu.com/sunicdavy/aggbug/108353.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/sunicdavy/" target="_blank">鎴橀瓊灝忕瓚</a> 2010-02-24 17:11 <a href="http://m.shnenglu.com/sunicdavy/archive/2010/02/24/108353.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Lua鑴氭湰嫻偣杞暣褰ug鍒嗘瀽http://m.shnenglu.com/sunicdavy/archive/2010/02/04/107161.html鎴橀瓊灝忕瓚鎴橀瓊灝忕瓚Thu, 04 Feb 2010 04:49:00 GMThttp://m.shnenglu.com/sunicdavy/archive/2010/02/04/107161.htmlhttp://m.shnenglu.com/sunicdavy/comments/107161.htmlhttp://m.shnenglu.com/sunicdavy/archive/2010/02/04/107161.html#Feedback9http://m.shnenglu.com/sunicdavy/comments/commentRss/107161.htmlhttp://m.shnenglu.com/sunicdavy/services/trackbacks/107161.html鍓嶉潰涓鐗?a href="http://m.shnenglu.com/sunicdavy/archive/2010/02/04/107155.html">鏂囩珷涓璴ua鍑虹幇鐨刡ug錛屽叾瀹炴槸lua鏈韓緇撴瀯闂瀵艱嚧鐨勶細

    lua涓紝鏁板間嬌鐢╠ouble鏉ュ瓨鍌紝鍖呭惈鏁村艦鍜宒ouble銆傝岃В鏋愬嚭鏉ョ殑鏁村艦涔熸槸琚己杞負double榪涜瀛樺偍錛岃繖鏍峰氨浼氬嚭闂銆?/p>

    涓句竴涓畝鍗曠殑渚嬪瓙錛?/p>

    double f = (double)0xffffffff;
    int a = int(f);

    a鑲畾涓嶆槸-1

    榪欓噷鐨勬枃绔犺鏄庤繖涓被鍨嬭漿鎹㈤棶棰樼殑緙樼敱銆?/p>

     

    鍦?a >Squirrel鑴氭湰涓氨涓嶄細鏈夎繖涓棶棰?/p>

    local a = 0xffffffff

    print( a )

    緇撴灉涓?1

    鏌ョ湅鍏舵簮浠g爜錛?/p>

    typedef union tagSQObjectValue
    {
        struct SQTable *pTable;
        struct SQArray *pArray;
        struct SQClosure *pClosure;
        struct SQGenerator *pGenerator;
        struct SQNativeClosure *pNativeClosure;
        struct SQString *pString;
        struct SQUserData *pUserData;
        SQInteger nInteger;
        SQFloat fFloat;
        SQUserPointer pUserPointer;
        struct SQFunctionProto *pFunctionProto;
        struct SQRefCounted *pRefCounted;
        struct SQDelegable *pDelegable;
        struct SQVM *pThread;
        struct SQClass *pClass;
        struct SQInstance *pInstance;
        struct SQWeakRef *pWeakRef;
        SQRawObjectVal raw;
    }SQObjectValue;

     

    鍙互鐪嬪埌

    SQInteger nInteger;
    SQFloat fFloat;

    鏄垎寮瀛樺偍鐨勶紝鍥犳灝變笉浼氭湁榪欎釜闂

     

    lua瑙e喅鏂規硶錛?/p>

    1. 灝嗗崄鍏繘鍒舵崲涓?0榪涘埗瀛樺偍

    2. 絳夊緟澶т緺鎴栬呭畼鏂逛慨鏀逛唬鐮侊紝鍋氬嚭patch



    ]]>
    Lua鍦≧elease鐗堟湰涓嬬殑涓涓猙ughttp://m.shnenglu.com/sunicdavy/archive/2010/02/04/107155.html鎴橀瓊灝忕瓚鎴橀瓊灝忕瓚Thu, 04 Feb 2010 02:59:00 GMThttp://m.shnenglu.com/sunicdavy/archive/2010/02/04/107155.htmlhttp://m.shnenglu.com/sunicdavy/comments/107155.htmlhttp://m.shnenglu.com/sunicdavy/archive/2010/02/04/107155.html#Feedback2http://m.shnenglu.com/sunicdavy/comments/commentRss/107155.htmlhttp://m.shnenglu.com/sunicdavy/services/trackbacks/107155.html鏈榪戝皢鑷繁鐨刄I宸ョ▼鍦≧elease鐗堜笅緙栬瘧錛屽彂鐜版湁閮ㄥ垎鎺т歡鐨勯鑹插眳鐒跺亸榛勶紝鎯沖繀娑叉櫠涔熶笉鑷充簬鑰佸寲鐨勯偅涔堝帀瀹籌紝闅忔満寮濮嬪皢宸ョ▼鍔犲叆璋冭瘯淇℃伅榪涜璺熻釜錛屾帓闄I宸ョ▼錛屽強鑷繁鍐欑殑lua灝佽闂錛屽皢闂緙╁皬涓猴細

    lua浠g爜錛?/p>

    t = {}

    t.FillColor = 0xFFFFFFFF

    foo( t )

    鍦–++涓敞鍐屼竴涓猣oo鍑芥暟錛岀劧鍚庤幏鍙杢able t涓殑FillColor鎴愬憳

    鍙戠幇鍙栧緱鐨勫煎眳鐒朵負0x80000000

     

    浣跨敤lua c api嫻嬭瘯浠g爜

    lua_newtable( L );
    lua_setglobal( L, "t");

    lua_getglobal( L, "t");
    lua_pushstring(L,"FillColor");
    lua_pushinteger( L, 0xffffffff );
    lua_pushinteger( L, -1 );
    lua_settable( L, -3 );

    lua_getglobal( L, "t");
    lua_pushstring( L, "FillColor");
    lua_gettable( L, -2 );
    int t = lua_tointeger( L, -1 );

    緇撴灉t涔熸槸0x80000000

     

    鐒跺悗灝嗗崄鍏繘鍒剁殑0xFFFFFFFF鎹㈡垚鍗佽繘鍒剁殑4294967295錛屾祴璇曠粨鏋滄紜樉紺?1

    鍐嶄嬌鐢ㄥ嚑涓牱鏈祴璇?

    0xFF5F5F5F = 4284440415 浼氳鏀規垚0xFF5F5F00

     

    榪欎釜bug鍊掓槸寰堝ソ瑙e喅錛屽皢浠g爜涓殑鍗佸叚榪涘埗鏁板叏鎹負10榪涘埗鍗沖彲銆備絾鏄負浠涔堝彧鍦≧elease鐗堟湰鍙戠敓鍛紵

    鏈漢浣跨敤鐨勬槸lua 5.1.4 鍘熺敓



    ]]>
    涓涓狢++鏍囧噯搴撳鑷寸殑閿欒http://m.shnenglu.com/sunicdavy/archive/2009/11/11/100712.html鎴橀瓊灝忕瓚鎴橀瓊灝忕瓚Wed, 11 Nov 2009 08:49:00 GMThttp://m.shnenglu.com/sunicdavy/archive/2009/11/11/100712.htmlhttp://m.shnenglu.com/sunicdavy/comments/100712.htmlhttp://m.shnenglu.com/sunicdavy/archive/2009/11/11/100712.html#Feedback4http://m.shnenglu.com/sunicdavy/comments/commentRss/100712.htmlhttp://m.shnenglu.com/sunicdavy/services/trackbacks/100712.html    鏈榪戝皢浠g爜璋冩暣涓簉elease鐗堟椂錛岀鍒拌繖鏍蜂竴涓鎬殑閿欒錛氱洿鎺ヨ繍琛岀▼搴忥紝榪樻病鏈夎繘鍏ain鍏ュ彛鏃跺氨瀹曟帀銆傝繖涓猠xe宸ョ▼閾炬帴榪囦竴涓叕鐢ㄧ殑闈欐佸簱鍜屼竴涓簳灞傚姛鑳界殑闈欐佸簱銆傚湪debug鐗堝畬鍏ㄦ病鏈夐棶棰樸?/p>

        闅忓嵆寮濮嬮殧紱諱唬鐮佸垎鏋愶紝褰撻殧紱誨埌涓涓戶鎵垮叕鐢ㄩ潤鎬佸簱鏃訛紝闅旂鍚庝笉浼氬畷鏈恒傝繖琛ㄧず闈欐佸簱涓巈xe涔嬮棿鐨勯摼鎺ュ嚭浜嗕竴浜涢棶棰樸傚啀嬈¤瀵熸寕鎺夌殑鍦版柟鏄劇ずstreambuf涓綾葷殑涓滆タ錛岃繖鏄寘鍚湪iostream閲岀殑涓滆タ錛岀戶緇偣鍑誨爢鏍堝悜涓婅窡韙傜粨鏋滃湪wcout.cpp閲屽彂鐜頒簡

    __PURE_APPDOMAIN_GLOBAL static wfilebuf wfout(_cpp_stdout);

    鎵鏈夐棶棰樿繋鍒冭岃В錛屽簲璇ユ槸鎭跺績鐨刬ostream鐨勯潤鎬佸彉閲忥紝鍦ㄥ閲嶉潤鎬佸簱閾炬帴鏃剁殑閿欒錛屽鑷磂xe鍚姩錛孋RT涓哄叾鍒嗛厤鍐呭瓨鏃剁殑瀹曟満銆傞┈涓婂睆钄芥墍鏈変嬌鐢ㄨ繃wcout鍙奿ostream鐨勬墍鏈変唬鐮併俽elease鐗堟甯歌繍琛岋紝涓嶅啀瀹曟満



    ]]>
    緇忓吀鐨凜++鍐呭瓨鍒嗛厤瀵艱嚧crash鐨勬渚?/title><link>http://m.shnenglu.com/sunicdavy/archive/2009/09/03/95218.html</link><dc:creator>鎴橀瓊灝忕瓚</dc:creator><author>鎴橀瓊灝忕瓚</author><pubDate>Thu, 03 Sep 2009 08:10:00 GMT</pubDate><guid>http://m.shnenglu.com/sunicdavy/archive/2009/09/03/95218.html</guid><wfw:comment>http://m.shnenglu.com/sunicdavy/comments/95218.html</wfw:comment><comments>http://m.shnenglu.com/sunicdavy/archive/2009/09/03/95218.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://m.shnenglu.com/sunicdavy/comments/commentRss/95218.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/sunicdavy/services/trackbacks/95218.html</trackback:ping><description><![CDATA[ <p>浠婂ぉqq鏌愬ぇ渚犻棶鎴戯紝涓哄暐浠栫殑浠g爜浼歝rash</p><pre class="csharpcode"><span id="hvzpftn" class="kwrd">char</span>* pdata = <span id="hvzpftn" class="kwrd">new</span> <span id="hvzpftn" class="kwrd">char</span>(14245); ::memset( pdata, 0, 14245 ); </pre> <p>鎴戦┈涓婅繍琛屼唬鐮侊紝緇撴灉鏋滅湡鏄疉ccess Violent銆?/p> <p>涔嬪悗璇曡繃malloc閮芥病鏈夐棶棰?/p> <p>闅忔満鎴戞妸榪欐浠g爜鍒犻櫎錛岃繃浜嗗嚑鍒嗛挓鍚庯紝鎴戞寜鐓ц蹇嗭紝閲嶆柊鍐欎笅浠g爜</p><pre class="csharpcode"><span id="hvzpftn" class="kwrd">char</span>* pdata = <span id="hvzpftn" class="kwrd">new</span> <span id="hvzpftn" class="kwrd">char</span>[14245]; ::memset( pdata, 0, 14245 ); 緇撴灉涓峜rash浜嗐傜粏緇嗕竴鐪?/pre><pre class="csharpcode">銆?/pre><pre class="csharpcode">銆?/pre><pre class="csharpcode">銆?/pre><pre class="csharpcode"> </pre><pre class="csharpcode"> </pre><pre class="csharpcode"> </pre><pre class="csharpcode"> </pre><pre class="csharpcode"> </pre><pre class="csharpcode"> </pre><pre class="csharpcode">涓哄暐瑕佽皟鐢╟har鐨勬瀯閫犲嚱鏁頒紶鍏?4245鐨勫弬鏁板憿錛熻繖鏍峰彧鑳絥ew鍑烘潵1涓瓧鑺傦紝浣嗘槸memset鍙堝啓浜?4245涓瓧鑺傦紝涓嶆寕鎵嶆湁楝間簡</pre><pre class="csharpcode">涔嬪悗闂繃寰堝浜猴紝鍩烘湰閮芥病鐪嬪嚭鏉ワ紝鍙榪欎釜鍐欐硶鏋佸叾楠椾漢</pre><img src ="http://m.shnenglu.com/sunicdavy/aggbug/95218.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/sunicdavy/" target="_blank">鎴橀瓊灝忕瓚</a> 2009-09-03 16:10 <a href="http://m.shnenglu.com/sunicdavy/archive/2009/09/03/95218.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>瀵笴++ delete[] 涓鐩村拷鐣ョ殑闂http://m.shnenglu.com/sunicdavy/archive/2009/08/20/93934.html鎴橀瓊灝忕瓚鎴橀瓊灝忕瓚Thu, 20 Aug 2009 10:22:00 GMThttp://m.shnenglu.com/sunicdavy/archive/2009/08/20/93934.htmlhttp://m.shnenglu.com/sunicdavy/comments/93934.htmlhttp://m.shnenglu.com/sunicdavy/archive/2009/08/20/93934.html#Feedback3http://m.shnenglu.com/sunicdavy/comments/commentRss/93934.htmlhttp://m.shnenglu.com/sunicdavy/services/trackbacks/93934.html    C++涓嬌鐢╠elete榪涜鍗曚釜瀵硅薄鐨勬瀽鏋勫強鍐呭瓨鍒犻櫎錛屼嬌鐢╠elete[]榪涜瀵硅薄鏁扮粍鐨勬瀽鏋勫強鍐呭瓨鍒犻櫎

        璁板緱鏌愭鍙嬩漢灞傝榪囷紝delete[]鍦╓indows騫沖彴涓婇兘鏄敤HeapFree鏉ュ疄鐜扮殑錛屽洜姝elete[]鍜宒elete鏉ュ垹闄ゅ璞℃暟緇勬椂閮芥槸涓鏍風殑銆備箣鍚庢垜涔熷弬鑰冭繃寰堝鐨勫唴瀛樼鐞嗗櫒鍙妌ew/delete閲嶈澆瀹炵幇,鍩烘湰閮芥槸榪欎釜閬撶悊銆?/p>

        鏈榪戠獊鐒跺彂鐜幫紝濡傛灉鏄璞℃暟緇勭殑璇濓紝浣跨敤delete紜疄鑳藉垹闄ゅ唴瀛橈紝浣嗘槸瀵硅薄鏁扮粍涓殑姣忎釜瀵硅薄鐨勬瀽鏋勫氨涓嶈兘琚皟鐢ㄤ簡銆傚垢濂藉鉤鏃朵竴鐩撮兘榪樻槸淇濇寔鑹ソ鐨凜++涔犳儻錛屼竴鐩翠嬌鐢╠elete[]錛屽茍涓斾嬌鐢╪ew[]澶ч儴鍒嗘槸char綾誨瀷錛屼笉闇瑕佹瀽鏋?/p>

    ]]>
    lua搴撲嬌鐢ㄧ粡楠屼竴鍒?/title><link>http://m.shnenglu.com/sunicdavy/archive/2009/07/20/90632.html</link><dc:creator>鎴橀瓊灝忕瓚</dc:creator><author>鎴橀瓊灝忕瓚</author><pubDate>Mon, 20 Jul 2009 08:20:00 GMT</pubDate><guid>http://m.shnenglu.com/sunicdavy/archive/2009/07/20/90632.html</guid><wfw:comment>http://m.shnenglu.com/sunicdavy/comments/90632.html</wfw:comment><comments>http://m.shnenglu.com/sunicdavy/archive/2009/07/20/90632.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://m.shnenglu.com/sunicdavy/comments/commentRss/90632.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/sunicdavy/services/trackbacks/90632.html</trackback:ping><description><![CDATA[ <p>浠婂ぉ灝嗛儴鍒嗗伐紼嬩粠闈欐侀摼鎺ュ簱鏀逛負鍔ㄦ侀摼鎺ュ簱錛屽茍浣跨敤鎺ュ彛鏂瑰紡鍒涘緩鏃訛紝鍘熸潵lua璋冪敤鐨勫湴鏂瑰眳鐒舵寕鎺変簡錛屾寕鐨勫湴鏂規槸table鍦ㄦ竻闄ゆ椂錛宑rash鍦╪ewkey</p> <p>google浜嗕竴涓嬶紝鎵懼埌浜嗕竴綃囬鏈夊弬鑰冧環鍊肩殑<a >鏂囩珷</a></p> <p> </p><pre>A common error is to link C extension modules (shared libraries) with the static library. The linker command line for extension modules must not ever contain -llua or anything similar!</pre><pre>I.e. check your build process. If you are unsure where the two copies of the Lua core come from, grep the binaries for some characteristic error message, like "table index is nil".</pre><pre>鎴戠殑lua灝佽搴撴槸涓巐ua婧愮爜涓璧峰皝瑁呭湪涓涓潤鎬侀摼鎺ュ簱鎻愪緵緇欐墍鏈夌▼搴忛摼鎺ヤ嬌鐢ㄣ傛湁浜涘伐紼嬪彧鏈?涓猟ll鎴栬卐xe鍗曠嫭閾炬帴錛屼笉浼氬嚭鐜伴棶棰樸傞棶棰樺緢澶х▼搴︿笂灝卞彂鐢熶簬灝嗕竴涓猯ua婧愮爜鏋勬垚鐨勫簱閾炬帴緇欏涓猟ll鎴栬卐xe錛屾垨鑰呮販鏉傞摼鎺ワ紝榪欐牱鏋佹槗鍑虹幇鑾悕鍏跺鐨則able璁塊棶鍒癲ummy_node鐨勯敊璇儏鍐?/pre><pre>鍥犳錛岄┈涓婅皟鏁達紝灝濊瘯灝嗚繖涓簱鏀逛負dll銆備絾鏄湪涓浜涙ā鏉垮嚱鏁板亸鐗瑰寲涓婂嚭鐜頒簡閾炬帴闂銆傛渶鍚庡彂鐜幫紝鍔ㄦ侀摼鎺ュ簱瀹屽叏灝辨槸妯℃澘鐨勫櫓鑰楋紝铏界劧妯℃澘鍑芥暟鏄唴鑱旓紝瀵逛簬鍏ㄥ眬鐨勬ā鏉垮嚱鏁幫紝灝嗗叾鏀懼湪澶存枃浠朵腑灝變細鍑虹幇澶氶噸寮曠敤闂銆傚洜姝ゆ斁寮冿紝灝唋ua5.1鐨勬簮鐮佹斁鍦ㄤ竴涓猟ll涓紝灝嗗皝瑁呭簱鏀懼湪闈欐佸簱涓紝榪欐牱灝辯粷瀵規病鏈変換浣曢棶棰?/pre><img src ="http://m.shnenglu.com/sunicdavy/aggbug/90632.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/sunicdavy/" target="_blank">鎴橀瓊灝忕瓚</a> 2009-07-20 16:20 <a href="http://m.shnenglu.com/sunicdavy/archive/2009/07/20/90632.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>璇″紓鐨刅isual Studio 鐨勮皟璇昩ughttp://m.shnenglu.com/sunicdavy/archive/2009/07/17/90351.html鎴橀瓊灝忕瓚鎴橀瓊灝忕瓚Fri, 17 Jul 2009 08:06:00 GMThttp://m.shnenglu.com/sunicdavy/archive/2009/07/17/90351.htmlhttp://m.shnenglu.com/sunicdavy/comments/90351.htmlhttp://m.shnenglu.com/sunicdavy/archive/2009/07/17/90351.html#Feedback0http://m.shnenglu.com/sunicdavy/comments/commentRss/90351.htmlhttp://m.shnenglu.com/sunicdavy/services/trackbacks/90351.html 

    宸ョ▼緇撴瀯

    鍖呭惈鏈夐潤鎬佸簱

    motion.lib 涓涓猆I閫昏緫鐨勫簱

    HGErender.lib  浣跨敤涓涓猰otion鐨勬帴鍙e疄鐜扮殑HGE娓叉煋鍣紝涓巑otion.lib娌℃湁閾炬帴鍜屼緷璧栧叧緋?/p>

    涓涓猠xe闈欐侀摼鎺otion.lib鍜孒GErender.lib

     

    motion涓姞鍏ヤ簡涓浜沠lash鏀寔錛屽皢flash鐨勫寘鍚斁鍒頒簡棰勭紪璇戝ご鏂囦歡錛岃繖閮ㄥ垎澶存枃浠秂xe鏄病鏈夊紩鐢ㄧ殑

    琛ㄧ幇鐥囩姸

    exe鍙互姝e父榪愯錛屼絾鏄湪motion涓柊娣誨姞鐨刦lash綾誨疄渚嬪寲鍚庢棤娉曠湅鍒版垚鍛?/p>

    閲嶇紪錛岄噸鏂發ink錛屾竻絀洪噸緙栨棤鐢?/p>

    鎹㈢敤vs2005錛屼緷鐒舵棤鐢紝浣嗘槸鎶ヤ簡涓涓狤rror: error in OMF type information 閿欒

    瑙e喅鏂規硶

    灝濊瘯灝唂lash鍖呭惈鍒伴緙栬瘧澶寸殑鏂囦歡鏀懼埌瀵瑰鍖呭惈涓紝璁〆xe涔熻兘鐪嬪埌榪欎竴閮ㄥ垎

    闂瑙e喅

    鍒嗘瀽

    VS鐨勮皟璇曠郴緇熷茍涓嶆槸瀹屽叏寮鍙戯紝鍥犳鎴戜滑鍙兘浠庝竴浜涜〃璞℃潵鍒嗘瀽涓浜涜皟璇曞櫒鍘熺悊鍙婅涓?/p>

    榪欎釜bug鐨勫師鍥犲氨鍦?浣滀負璋冭瘯鍏ュ彛鐨別xe騫舵病鏈夎幏寰楀畬鍏ㄧ殑motion閲岃皟璇曠殑淇℃伅銆傚鏋滃皢motion浣滀負dll鍔犺澆錛岀悊璁哄垎鏋愪笉浼氬嚭鐜拌繖縐嶉棶棰樸俤ll灝嗚浣滀負涓涓崟鐙殑璋冭瘯鍏ュ彛錛岄渶瑕佸崟鐙姞杞界嫭绔嬬殑pdb銆?/p>

    鏈緥涓紝闈欐佸簱涓殑璋冭瘯淇℃伅騫舵病鏈夐摼鎺ュ埌exe錛屽洜姝ょ湅涓嶅埌鎴愬憳鐨勪換浣曚俊鎭?/p>

    鎵╁睍

    澶у鏁扮殑娓告垙鎴栧簲鐢ㄧ▼搴忛兘鏄嬌鐢ㄩ潤鎬佸簱鏉ュ仛閾炬帴錛岃繖鏍鋒棤璁烘槸緙栧啓榪樻槸浠g爜瀹夊叏閮芥湁鎵鍏奸【銆備絾瀵逛簬宸ョ▼妯″潡涔嬮棿鐨勪簰鐩擱殧紱伙紝C/C++闈欐佸簱鏈韓鐨勬瘺鐥咃紙CRT鍐呭瓨鍒嗛厤鍙婇潤鎬侊紝鍏ㄥ眬鍙橀噺闂錛夊氨鍙樺緱灝や負涓ラ噸銆?/p>

    鑰屼嬌鐢ㄥ姩鎬侀摼鎺ュ簱鐨勬帴鍙f柟寮忎篃鏄湁涓閮ㄥ垎紼嬪簭榪欐牱浣跨敤鐨勶紝濡傛灉涓轟簡瀹夊叏鎴栬呭姞瀵嗭紝鍙互灝嗗姩鎬侀摼鎺ュ簱鏀懼埌鑷繁鐨勫寘鍐咃紝浣跨敤浠庡唴瀛樿鍙杁ll鐨勬妧鏈紝榪欐牱瀹夊叏錛屽伐紼嬫灦鏋勫張娓呮櫚



    ]]>
    lua閫鍑烘椂鍐呭瓨鍒犻櫎鐨勮寮傚紓甯稿強澶勭悊http://m.shnenglu.com/sunicdavy/archive/2009/06/20/88152.html鎴橀瓊灝忕瓚鎴橀瓊灝忕瓚Sat, 20 Jun 2009 02:47:00 GMThttp://m.shnenglu.com/sunicdavy/archive/2009/06/20/88152.htmlhttp://m.shnenglu.com/sunicdavy/comments/88152.htmlhttp://m.shnenglu.com/sunicdavy/archive/2009/06/20/88152.html#Feedback0http://m.shnenglu.com/sunicdavy/comments/commentRss/88152.htmlhttp://m.shnenglu.com/sunicdavy/services/trackbacks/88152.html      鏈榪戝湪浣跨敤鑷繁灝佷綇鐨勪竴濂條ua搴撲嬌鐢ㄤ腑閬囧埌榪欐牱涓涓棶棰橈紝澶氭敞鍐屼竴涓被鎴愬憳鍑芥暟鍚庯紝鍗充究涓涓猯ua鏂囦歡閮芥病鍔犺澆錛岄兘浼氬湪lua_close涓殑freestack鍑芥暟涓璫rash

          鎴戠殑lua灝佽闈炲父綆鍗曪紝鏀寔C++綾繪垚鍛樺嚱鏁拌皟鐢ㄤ笂涔熸槸鍦╨uaplus鍩虹涓婃敼閫犺屾潵鐨勶細

        void register_helper( lua_State* L, int tableindex, const char* funcname, lua_CFunction dispatcher, void* func, int sizeoffunc, const void* userdata, int sizeofud )
        {
            // function | userdata = lightuserdata
            unsigned char* buffer = (unsigned char*)lua_newuserdata( L, sizeoffunc + sizeofud );
            memcpy( buffer, (void*)func, sizeoffunc );
            memcpy( buffer + sizeoffunc, &userdata, sizeofud );
    
            lua_pushstring( L, funcname );
            lua_pushlightuserdata( L, (void*)buffer);  
            lua_pushcclosure(L, dispatcher, 1);
            lua_settable( L, tableindex );
        }
        
     

    媯鏌ュ彂鐜幫紝璨屼技鏄痩ua_newuserdata鐨勯棶棰橈紝灝嗗叾鎹負malloc錛岄棶棰樿В鍐充簡銆?/p>

    铏界劧鏀寔google浜嗕竴涓嬬被浼肩殑闂錛屽茍涓斾篃鍦╣c搴撳唴鎵撹繃鏂偣錛宯ew鍑烘潵鐨勫唴瀛樼粷闈炵畝鍗曠殑琚玤c鍥炴敹錛岃屾湁鍙兘鏄痩ua鏌愪簺鏈哄埗閫犳垚鐨勶紝姣曠珶榪欐牱緇機++鍋氱粦瀹氭槸寰堝父瑙佺殑

    椹笂鍋氫簡涓涓猯ist淇濆瓨鎸囬拡錛屽茍鍦╨ua_close涔嬪墠娓呴櫎榪欎簺鎸囬拡錛屾墍鏈夐棶棰樿繋鍒冭岃В



    ]]>
    鏂偣鏃犳晥鍒癈++ 鍏ㄥ眬綾繪瀯閫犺寰嬬爺絀?/title><link>http://m.shnenglu.com/sunicdavy/archive/2009/06/14/87619.html</link><dc:creator>鎴橀瓊灝忕瓚</dc:creator><author>鎴橀瓊灝忕瓚</author><pubDate>Sun, 14 Jun 2009 02:51:00 GMT</pubDate><guid>http://m.shnenglu.com/sunicdavy/archive/2009/06/14/87619.html</guid><wfw:comment>http://m.shnenglu.com/sunicdavy/comments/87619.html</wfw:comment><comments>http://m.shnenglu.com/sunicdavy/archive/2009/06/14/87619.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/sunicdavy/comments/commentRss/87619.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/sunicdavy/services/trackbacks/87619.html</trackback:ping><description><![CDATA[ <p>鏈榪戦亣鍒頒竴涓獀s2008 C++涓柇鐐規棤娉曞伐浣滅殑闂錛屽叿浣撹〃鐜頒負錛? </p><p>1. 鏌愪釜淇敼鍚庯紝鏂偣鏃犳硶宸ヤ綔錛屼箣鍓嶇増鏈緷鐒舵甯? </p><p>2. 鍙槸鏌愪釜鏂囦歡涓柇鐐規棤娉曞伐浣? </p><p>3. 鏂偣鎵撳湪 寮曠敤鍙﹀DLL涓殑綾誨璞 </p><p>鏂囦歡緇撴瀯錛? </p><p>Core.dll </p><p>A.cpp </p><pre class="csharpcode"><span id="hvzpftn" class="kwrd">class</span> A { <span id="hvzpftn" class="kwrd">public</span>: A( ) { printf(<span id="hvzpftn" class="str">"constructor of a"</span>); } } </pre> <style type="text/css">.csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } </style> <pre class="csharpcode"> </pre> <style type="text/css">.csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } </style> <p>UI.dll </p><p>Manager.cpp </p><pre class="csharpcode"><span id="hvzpftn" class="kwrd">class</span> Manager { <span id="hvzpftn" class="kwrd">public</span>: Manager( ) { printf(<span id="hvzpftn" class="str">"constructor of Manager"</span>); } } </pre> <style type="text/css">.csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } </style> <p>  </p><p>Button.cpp </p><p>A ins; // 鏂偣鎵撳湪榪欓噷 </p><p>Run.exe </p><pre class="csharpcode"><span id="hvzpftn" class="kwrd">void</span> main() { Manager ins; <span id="hvzpftn" class="rem">// 瀹炰緥鍖?</span> } </pre> <style type="text/css">.csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } </style> <p>榪欓噷鍙戠幇<strong>A鏍規湰涓嶄細琚獵 runtime鍦ㄦ墽琛宮ain涔嬪墠鏋勯?/strong>錛屽洜姝ゆ柇鐐規棤娉曟墦鍒? </p><p>宸茬粡鎺掗櫎鐗規畩瀛楃褰卞搷鐨勫師鍥狅紝鎸夌収緗戜笂鐨勬柟娉曟槸錛屽皢鏂囦歡淇濆瓨涓篣NICODE錛岄棶棰樹緷鏃? </p><p>寮濮嬬敤鎺掗櫎闅旂娉曠‘瀹氶棶棰樹綅緗紝鏈鍚庡彂鐜拌繖鏍蜂竴涓寰嬶細 </p><p><strong>鍙鍦∕anager.cpp閲屾瀯閫犱竴涓狟utton </strong> </p><p><strong>Button insB; </strong> </p><p><strong>榪欐牱鍋氫簡浠ュ悗錛屾柇瀹氬繀瀹氳兘璧蜂綔鐢ㄣ?</strong> </p><p>鍥犳鎺ㄦ柇CRT灞傜殑鍏ㄥ眬鏋勯犳槸闇瑕佷竴涓摼琛ㄦ潵鎺ㄥ姩鐨? </p><p>鍥犱負Manager闇瑕佹瀯閫狅紝鍥犳CRT鑲畾浼氭壂鎻忚繖涓狢PP瀵瑰簲OBJ閾炬帴鍒癳xe閲岀殑孌碉紝璁╄繖涓閲岀殑鍏ㄥ眬鏋勯犲嚱鏁伴兘鍒濆鍖栵紝浣嗘槸Button鍥犱負娌℃湁浣跨敤錛屽洜姝や篃涓嶄細鏋勯犮傝繖鏍峰眬閮ㄦ壂鎻忓簲璇ユ槸鍑轟簬鏁堢巼. </p><p>瑙e喅榪欎釜闂榪樻湁涓涓柟娉曞氨鏄叏閮ㄤ嬌鐢ㄩ潤鎬侀摼鎺ユ柟寮忥紝榪欐牱鏋勯犱唬鐮侀兘鏀懼埌鏈鍚庣殑exe涓紝灝變笉浼氬嚭鐜拌繖鏍風殑闂 </p><img src ="http://m.shnenglu.com/sunicdavy/aggbug/87619.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/sunicdavy/" target="_blank">鎴橀瓊灝忕瓚</a> 2009-06-14 10:51 <a href="http://m.shnenglu.com/sunicdavy/archive/2009/06/14/87619.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鐮磋ВVC鐨勬柇鐐逛繚瀛樹綅緗?/title><link>http://m.shnenglu.com/sunicdavy/archive/2009/06/10/87346.html</link><dc:creator>鎴橀瓊灝忕瓚</dc:creator><author>鎴橀瓊灝忕瓚</author><pubDate>Wed, 10 Jun 2009 09:36:00 GMT</pubDate><guid>http://m.shnenglu.com/sunicdavy/archive/2009/06/10/87346.html</guid><wfw:comment>http://m.shnenglu.com/sunicdavy/comments/87346.html</wfw:comment><comments>http://m.shnenglu.com/sunicdavy/archive/2009/06/10/87346.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/sunicdavy/comments/commentRss/87346.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/sunicdavy/services/trackbacks/87346.html</trackback:ping><description><![CDATA[ <p>涓鐩翠笉鏄緢娓呴櫎VC鐨勬柇鐐逛繚瀛樹簬浣曞錛岃鎴戜滑鐪嬪嚑涓瘉鎹細 </p><ol style="margin-left: 90pt"><li>澶氫漢寮鍙戜腑錛岀粡甯告洿鏂板埆浜虹殑浠g爜鍚庯紝紿佺劧鍋滃湪鏌愪釜鑷繁娌℃墦榪囩殑鏂偣涓婏紝鎴戜滑緇勭О涔嬩負闄勯佹柇鐐廣? </li><li>騫朵笖鏃犺VSS榪樻槸SVN絳変唬鐮佺鐞嗗伐鍏烽兘浼氬嚭榪欐牱鐨勯棶棰樸備絾鏄綘鎻愪氦鐨勫彧鏈変唬鐮侊紝娌℃湁鍏朵粬鍗曠嫭鐨勯厤緗枃浠? </li><li>VC2005涓紝鍗充究鎵撹繃SP1錛屼篃浼氱鍒版煇涓枃浠剁獊鐒舵棤娉曟墦鏂偣鐨凚UG錛堟帓闄ゆ病鏈夐噸緙栵紝鎵撻敊鏂囦歡鏂偣絳変綆綰ч敊璇級錛岃В鍐沖姙娉曟槸錛氭墦寮璁頒簨鏈紝灝嗚繖涓枃浠剁殑浠g爜鍏ㄩ儴綺樿創鍒拌浜嬫湰錛屽啀甯栧洖鏉? </li><li>VB涓殑浠g爜鏂囦歡錛屼嬌鐢ㄨ浜嬫湰鎵撳紑鏃訛紝鍙互鐪嬪埌姣擨DE閲岀湅鍒版洿澶氱殑閰嶇疆鍨嬩唬鐮? </li></ol><p>緇間笂鎵榪幫紝鍩烘湰鍙互鏂畾VC鐨勬柇鐐硅淇濆瓨浜庝唬鐮佺殑灝鵑儴鐨勬煇涓綅緗紝鐪嬩笉瑙佺殑涓浜涘瓧絎?/p><img src ="http://m.shnenglu.com/sunicdavy/aggbug/87346.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/sunicdavy/" target="_blank">鎴橀瓊灝忕瓚</a> 2009-06-10 17:36 <a href="http://m.shnenglu.com/sunicdavy/archive/2009/06/10/87346.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>闊╂枃鎿嶄綔緋葷粺涓緭鍏ヤ腑鏂囩殑闂http://m.shnenglu.com/sunicdavy/archive/2009/05/20/83451.html鎴橀瓊灝忕瓚鎴橀瓊灝忕瓚Wed, 20 May 2009 03:32:00 GMThttp://m.shnenglu.com/sunicdavy/archive/2009/05/20/83451.htmlhttp://m.shnenglu.com/sunicdavy/comments/83451.htmlhttp://m.shnenglu.com/sunicdavy/archive/2009/05/20/83451.html#Feedback2http://m.shnenglu.com/sunicdavy/comments/commentRss/83451.htmlhttp://m.shnenglu.com/sunicdavy/services/trackbacks/83451.html    鏈榪戣亰澶╃郴緇熸祴鍑轟竴涓棶棰橈細嫻嬭瘯浜哄憳浣跨敤鐨勬槸闊╂枃鎿嶄綔緋葷粺錛屽湪涓婇潰瀹夎浜嗘悳鐙椾腑鏂囪緭鍏ユ硶銆備粬浠簰鐩鎬箣闂村彂閫侀煩鏂囪亰澶╂槸娌℃湁涔辯爜鐨勶紝浣嗘槸鎴戜滑鍜屼粬浠簰鐩鎬互涓枃鍙戦佹椂錛屼細鍑虹幇涔辯爜鎯呭喌銆傞殢鍗寵繘琛屾祴璇曞彂鐜頒互涓嬮棶棰橈細

        瀵逛簬 "寰峰浗"

        浠栦滑鍙戦佺殑緙栫爜鏁版嵁涓?d3 ec 3f

        鑰屾垜浠殑涓枃緋葷粺涓?b5 c2 b9 fa

        鍥犱負鑱婂ぉ緋葷粺閲囩敤ANSI鐨勬灦鏋勶紝浣嗘槸涓轟粈涔堝悓鏄笢鏂硅璦緋伙紝涓涓細鏄疷TF8,涓涓槸ANSI鍙屽瓧鑺傦紝鍥犳灝嗚亰澶╃郴緇熸暣浣撳彂閫佹崲鎴愮函UNICODE榪涜嫻嬭瘯



    ]]>
    青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
      <noscript id="pjuwb"></noscript>
            <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
              <dd id="pjuwb"></dd>
              <abbr id="pjuwb"></abbr>
              裸体素人女欧美日韩| 亚洲高清在线播放| 亚洲黄色片网站| 亚洲一区二区三区成人在线视频精品| 亚洲一区中文字幕在线观看| 欧美 亚欧 日韩视频在线| 一区二区高清在线观看| 久久婷婷久久| 国产欧美日韩91| 一本久道久久综合中文字幕| 久久久视频精品| 亚洲天堂视频在线观看| 欧美日韩 国产精品| 亚洲第一中文字幕在线观看| 久久精品国产免费看久久精品| 亚洲精品乱码久久久久久黑人| 久久精品亚洲乱码伦伦中文 | 久久精品99无色码中文字幕| 久久先锋影音| 国语自产在线不卡| 欧美在线免费观看视频| 亚洲欧美韩国| 国产精品资源| 亚洲一区亚洲| 一本色道久久综合狠狠躁篇怎么玩 | 国产视频精品免费播放| 亚洲午夜精品久久久久久浪潮| 蜜臀va亚洲va欧美va天堂| 亚洲国产欧美精品| 久久久国产精彩视频美女艺术照福利| 一区二区三区久久网| 亚洲午夜精品一区二区| 欧美日韩精品一区二区天天拍小说| 国内精品亚洲| 日韩五码在线| 亚洲人人精品| 国产精品国产a| 亚洲一区二区三区免费观看| 亚洲精品视频在线播放| 欧美三级电影精品| 亚洲天堂成人| 中文一区在线| 亚洲精品视频免费观看| 国产精品久久国产精品99gif| 亚洲香蕉网站| 欧美国产精品劲爆| 欧美精品国产精品| 国产乱码精品1区2区3区| 欧美亚洲视频| 久久精品一区二区三区中文字幕| 精品动漫3d一区二区三区| 久久在线精品| 欧美视频一区二区三区四区| 亚洲伊人网站| 你懂的视频一区二区| 午夜精品视频网站| 永久域名在线精品| 亚洲日本乱码在线观看| 国产精品久久久久久超碰| 亚洲国产福利在线| 一本在线高清不卡dvd| 国产精品伦子伦免费视频| 免费久久精品视频| 欧美精品在线观看一区二区| 亚洲欧美美女| 久久亚洲综合色一区二区三区| 日韩亚洲欧美精品| 亚洲欧美经典视频| 欧美日韩在线精品| 欧美www在线| 欧美日韩在线播放三区| 韩国精品久久久999| 欧美承认网站| 欧美成人影音| 久久aⅴ国产紧身牛仔裤| 欧美大片在线看| 午夜精品免费在线| 中文日韩在线| 国产日产高清欧美一区二区三区| 欧美大胆成人| 欧美大片在线影院| 国产精品久久久久影院色老大| 欧美99在线视频观看| 国产精品毛片一区二区三区| 亚洲福利久久| 韩国一区电影| 亚洲免费网址| 一色屋精品视频免费看| 一片黄亚洲嫩模| 国产免费观看久久| 亚洲另类在线一区| 欧美成人在线网站| 亚洲黄网站黄| 在线日韩欧美| 久久久99国产精品免费| 午夜视频一区| 欧美视频导航| 亚洲黄色大片| 亚洲午夜高清视频| 一本色道婷婷久久欧美| 久久最新视频| 久久这里只有精品视频首页| 国产精品一区二区你懂的| av成人福利| 一本一本久久a久久精品综合妖精| 一个人看的www久久| 亚洲性人人天天夜夜摸| 欧美一区二区三区视频在线观看| 久久久久久9999| 亚洲精品免费一区二区三区| 亚洲一区二区三区四区五区黄 | 韩日精品在线| 亚洲国产天堂久久国产91| 欧美激情国产日韩| 欧美激情一区二区三区在线视频| 久久婷婷国产综合精品青草| 国产麻豆精品theporn| 亚洲欧美日韩视频一区| 欧美一级在线亚洲天堂| 国产精品女主播在线观看| 亚洲午夜激情免费视频| 亚洲综合精品自拍| 国产精品欧美一区喷水| 亚洲欧美在线免费观看| 欧美在线www| 国产一区深夜福利| 久久久久久综合网天天| 欧美成人久久| 亚洲精品之草原avav久久| 欧美精品999| 亚洲免费av片| 午夜国产一区| 国产字幕视频一区二区| 久久亚洲国产精品一区二区| 免费观看亚洲视频大全| 亚洲精品午夜精品| 欧美视频一区二区三区…| 亚洲欧美清纯在线制服| 久久资源av| 国精品一区二区三区| 麻豆国产精品777777在线| 亚洲精品网址在线观看| 性欧美暴力猛交69hd| 影音先锋一区| 欧美体内she精视频| 欧美专区一区二区三区| 亚洲国产婷婷综合在线精品 | 欧美高清成人| 亚洲桃花岛网站| 欧美成人在线网站| 亚洲一区日韩在线| 伊人一区二区三区久久精品| 免费成人黄色片| 午夜精品成人在线| 99国产精品| 亚洲成人资源网| 国产精品一区毛片| 欧美成年网站| 午夜欧美视频| 亚洲人成在线观看网站高清| 午夜视频一区二区| 亚洲精品国产欧美| 欧美日韩日韩| 久久久欧美精品| 欧美岛国激情| 久久亚洲高清| 亚洲精品国久久99热| 在线观看日韩专区| 国产精品欧美在线| 国产精品免费福利| 欧美国产一区二区| 亚洲精品国久久99热| 久久久久免费视频| 国产欧美日韩亚洲一区二区三区| 欧美午夜电影网| 亚洲手机视频| 久久精品人人做人人综合 | 国产欧美一级| 久久中文字幕一区| 欧美电影免费观看| 亚洲免费在线播放| 国内外成人免费激情在线视频| 久久野战av| 99re8这里有精品热视频免费| 亚洲一区免费在线观看| 国产一区在线看| 欧美亚洲一区二区三区| 欧美bbbxxxxx| 欧美美女日韩| 亚洲精品国产日韩| 亚洲在线免费| 在线欧美影院| 韩国av一区二区三区| 欧美激情一二三区| 亚洲美女精品成人在线视频| 亚洲国产成人精品女人久久久 | 欧美精品xxxxbbbb| 欧美精品色综合| 亚洲黄色高清| 亚洲国产一区二区精品专区|