青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

聚星亭

吾笨笨且懶散兮 急須改之而奮進
posts - 74, comments - 166, trackbacks - 0, articles - 0
  C++博客 :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

       SDK/angelscript/projects目錄中,您可以找到許多流行編譯器的相關(guān)項目文件(原文: In the sdk/angelscript/projects directory you'll find project files for many of the popular compilers)。不過,那些工程文件不一定是最新的腳本庫工程。(原文: these project files are not always up to date with the latest version of the library.)如果你有任何一個編譯或鏈接出錯,請弄清楚工程文件包含的所有文件所在的sdk/angelscript/source目錄(原文: If you get any compiler or linker errors please make sure the project file include all the files in the sdk/angelscript/source directory),并將工程按照本文件進行設(shè)置(原文: and that the project settings are set according to this article.

,

       如果你找不到符合你編譯器的工程文件,你可以通過添加sdk/angelscript/source目錄下的全部文件到你的工程,并且對項目作適當(dāng)?shù)呐渲茫ㄔ?/span>: If you don't find a project file for your compiler, you can easily create your own project by adding all the files in the sdk/angelscript/source directory, and configuring the project apropriately.)。

 

       如果你有一個從沒使用過AngelScript的新編譯器,你可能需要編輯as_config.h文件以便合理的編譯本工程(If you have a new compiler/target that hasn't been used with AngelScript before, you may need to edit the as_config.h file to make sure the library is compiled properly. )。

 

1.1.1.      編譯時的選項設(shè)置(Set compile time options

       創(chuàng)建as_config.h頭文件是為了使本代碼盡可能的包含不同的編譯環(huán)境(原文: The code tries to contain compiler differences in as few places as possible. The header as_config.h was created for that purpose.)。為了支持不同的編譯器,你可能會發(fā)現(xiàn)一些 #defines 宏定義(There you will find some #defines that allow different compilers to work.)。這個文件一般情況下不需要修改,但是如果你用一個過舊的編譯器編譯出錯的話,可能就需要看一下這個文件了(原文: You'll probably not have to change this file, but if you're using a compiler not previously used and you're getting compiler errors it might be worth it to take a look at this file.)。

 

    當(dāng)在編譯這個庫時有一些 #defines 宏定義需要改寫,比如寫你應(yīng)該定義一個ANGELSCRIPT_EXPORT宏以便導(dǎo)出庫函數(shù)(原文: There are also a couple of other #defines used in the code to alter the compilation. When compiling the library you might want to define ANGELSCRIPT_EXPORT so that library functions are exported.)。當(dāng)然,如果在你的工程中包含了庫源代碼目錄的話就不用定義這個標(biāo)記了(If you include the library source code directly in your application project you shouldn't have to define this flag. )

 

       如果定義了AS_DEPRECATED 則支持向后兼容,這就可以幫你更方便的更新到最新版本(If AS_DEPRECATED is defined then some backwards compatibility is maintained, this can help you do the upgrade to the latest version a little more smoothly.)。盡管不能保證支持向后兼容,但是應(yīng)盡可能的移除不支持的功能(There is no guarantee that the backwards compatibility will be maintained though so try to remove use of deprecated functions as soon as possible.)。

1.1.2.      關(guān)聯(lián)腳本庫(Linking with the library)

       有四種方法可以編譯并連接AngelScript(原文: There are four ways of compiling and linking with AngelScript in order to use it.),我推薦把它連接成靜態(tài)庫(原文: I recommend linking with a static library.)。請注意,你只需要少許改動代碼這四種方法就可以相互轉(zhuǎn)換了(原文:Note that all four ways are interchangable with only a small change in your code,),即 在包含頭文件之前先定義一個標(biāo)記,然后可能需要手工加載一個DLL(原文: i.e a defined flag before including the header file, and possibly a routine for manually loading the dll.)。【接下來按照下面提供的任何一種方案操作都一樣(原文: The rest of your code should look exactly the same for each of the alternatives.)。】

 

1.在工程中包含腳本庫文件(原文: Include library source files in project

       你可以直接在自己的工程中包含AngelScript源文件(原文:You can take the source files for AngelScript and include them directly in your own project.)。

這樣的好處是可以保證腳本庫和宿主應(yīng)用程序都使用相同的編譯選項(原文:The advantage of this is that you can be sure that the same compiler options are used for the library and the host applications,),例如:CRT(應(yīng)該翻譯成C運行時么?)是多線程還是單線程(原文: e.g. multi-threaded or single-threaded CRT.)。缺點就是你的工程將包含有庫文件(原文: The disadvantage is that your project will be poluted with the library files.)

這些文件要使用這個腳本庫,可能需要包含angelscript.h頭再就不需要別的特殊設(shè)置了(原文: The files that need to use the library should include the angelscript.h header with no need for any special settings.)

// Include the library interface

#include "angelscript.h"

 

// ... Start using the library

 

2. 編譯一個靜態(tài)庫并連接到工程中(Compile a static library and link into project)

 

       極力推薦把它編譯成一個靜態(tài)庫并連接到自己的工程中(原文: The most recommended way is to compile a static library that your project will link with.)。在編譯靜態(tài)庫的時候必須先設(shè)置好編譯選項以免與CRT功能項沖突(功能: When compiling the static library you have to make sure that the correct compiler settings are used so that you don't get conflicts in linkage with the CRT functions.)。例如:如果腳本庫使用動態(tài)鏈接多線程的CRT而你的應(yīng)用程序采用單線程的靜態(tài)鏈接CRT(原文: This happens if you for example compile the library with dynamically linked multi-threaded CRT and your application with statically linked single-threaded CRT.(VisualC++中可以在Project -> Settings -> C/C++ -> Category: Code Generation中設(shè)置這些)

      

       接下來,要使用腳本庫你只需要包含angelscript.h頭文件即可(原文: To use the library you only need to include the angelscript.h header file.)。

// Include the library interface

#include "angelscript.h"

 

// ... Start using the library

 

3. 編譯一個導(dǎo)入庫的動態(tài)鏈接庫Compile a dynamically loaded library with an import library

       使用Microsoft Visual C + +就可以編譯導(dǎo)入庫動態(tài)加載庫(原文: With Microsoft Visual C++ it is possible to compile a dynamically loaded library with an import library.)。導(dǎo)入庫, 加載需要的DLL并綁定函數(shù)(原文: The import library will then take care of the work needed to load the dll and bind the functions.)。     這種方法可能存在缺點,如果腳本庫加載失敗就沒有辦法給出友好的錯誤提示(原文:A possible disadvantage of this method is that you are not able to give any user-friendly error messages in case loading the library fails.

 

       在包含angelscript.h頭文件之前定義個ANGELSCRIPT_DLL_MANUAL_IMPORT宏(原文:To use the library you'll have to define ANGELSCRIPT_DLL_LIBRARY_IMPORT before including the angelscript.h header file.)。

// Include the library interface

#define ANGELSCRIPT_DLL_LIBRARY_IMPORT

#include "angelscript.h"

 

// ... 開始使用腳本庫

 

4. 手工載入動態(tài)連接庫(Load the dynamically loaded library manually

       如果你想使用DLL,例如 在應(yīng)用程序之間共享代碼,我建議手工載入這個庫,這樣基本上所有的加載或綁定錯誤都可以得到緩解(原文: If you want to use a dll, e.g. to share code between applications, I recommend loading the library manually as you can treat any failures to load or bind functions graciously.)。

 

       手工載入DLL,你可以在包含angelscript.h頭文件之前定義個ANGELSCRIPT_DLL_MANUAL_IMPORT宏(原文:To use manually loaded dll, you should define ANGELSCRIPT_DLL_MANUAL_IMPORT before including the header file.)。這樣可以確保在頭文件中不用聲明函數(shù)原型,同樣就可以通過函數(shù)指針來使用這些的名字(原文: This will insure that the header file doesn't declare the function prototypes, as you will most likely want to use these names for the function pointers.)。

// Include the library interface

#define ANGELSCRIPT_DLL_MANUAL_IMPORT

#include "angelscript.h"

 

// 聲明函數(shù)指針

typedef asIScriptEngine * AS_CALL t_asCreateScriptEngine(int);

t_asCreateScriptEngine *asCreateScriptEngine = 0;

 

// ... 聲明其余函數(shù)

 

//載入DLL并綁定函數(shù) (error handling left out for clarity)

HMODULE dll = LoadLibrary("angelscript.dll");

asCreateScriptEngine = (t_asCreateScriptEngine*)GetProcAddress(dll, "_asCreateScriptEngine");

// 綁定其它函數(shù)

// 使用本腳本庫

 

                                                                                                        ---------  besterChen

                                                                                                         譯于 201031日星期六

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <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>
            久久精品视频在线| 洋洋av久久久久久久一区| 久久美女性网| 香蕉亚洲视频| 欧美一区二区视频免费观看| 亚洲欧美日韩成人高清在线一区| 亚洲视频在线观看网站| 亚洲欧美日韩精品久久| 久久久精品网| 欧美成熟视频| 欧美日韩不卡| 国产欧美日韩| 99re66热这里只有精品4| 亚洲欧美美女| 欧美激情精品| 亚洲伊人久久综合| 久久免费视频网| 欧美三区视频| 黄色成人av网站| 亚洲自拍偷拍视频| 麻豆视频一区二区| 一本色道久久综合亚洲精品小说| 亚洲欧美国产一区二区三区| 免费短视频成人日韩| 欧美视频成人| 亚洲精品1区2区| 亚洲欧美乱综合| 最近看过的日韩成人| 亚洲老板91色精品久久| 久久成人国产| 欧美午夜不卡影院在线观看完整版免费| 国产又爽又黄的激情精品视频| 亚洲精品免费一二三区| 午夜日韩激情| 亚洲激情校园春色| 久久久久久高潮国产精品视| 国产精品初高中精品久久| 亚洲第一精品在线| 久久男人av资源网站| 一区二区三区四区在线| 欧美激情乱人伦| 在线看片第一页欧美| 欧美怡红院视频| 日韩视频免费在线观看| 免费日韩av电影| 激情av一区二区| 午夜精品视频一区| 一区二区精品国产| 午夜精品影院在线观看| 亚洲激情网址| 美玉足脚交一区二区三区图片| 亚洲视频免费| 欧美日韩一区二区三区免费看| 国产亚洲激情| 欧美在线免费看| 亚洲欧美日韩天堂| 国产酒店精品激情| 性亚洲最疯狂xxxx高清| 亚洲一区二区三区高清| 国产精品va在线| 性色av一区二区三区| 亚洲综合国产| 国语自产精品视频在线看一大j8| 午夜影院日韩| 欧美在线播放| 在线观看欧美一区| 欧美电影免费| 女女同性精品视频| 99国产精品久久久| 一本一本久久a久久精品综合麻豆 一本一本久久a久久精品牛牛影视 | 欧美了一区在线观看| 亚洲欧洲在线一区| 亚洲欧洲一区| 国产精品久久久久久久久久三级 | 欧美日韩在线直播| 香蕉av777xxx色综合一区| 亚洲欧美一区二区激情| 国产视频久久久久| 嫩草影视亚洲| 欧美精品一卡二卡| 午夜亚洲激情| 久久躁狠狠躁夜夜爽| 亚洲最新合集| 午夜亚洲视频| 亚洲伦理一区| 亚洲综合视频1区| 亚洲高清久久久| 在线视频欧美一区| 伊人狠狠色丁香综合尤物| 亚洲精华国产欧美| 国产日本欧美一区二区| 欧美激情偷拍| 国产精品一区二区久激情瑜伽| 久久在线视频| 欧美丰满高潮xxxx喷水动漫| 一区二区欧美国产| 久久高清福利视频| 日韩一二三在线视频播| 亚洲综合欧美| 亚洲精品视频在线观看网站| 99亚洲一区二区| 伊人狠狠色j香婷婷综合| 亚洲永久网站| 久久国产精品久久久| 久久精品1区| 一区二区电影免费观看| 香蕉亚洲视频| 日韩一级欧洲| 欧美一级黄色录像| 99精品国产在热久久下载| 午夜精品久久久久久久蜜桃app | 噜噜噜久久亚洲精品国产品小说| 欧美刺激性大交免费视频| 亚洲欧美制服另类日韩| 麻豆成人小视频| 欧美在线不卡| 欧美视频一区在线观看| 欧美国产第二页| 韩日精品视频一区| 亚洲新中文字幕| 亚洲最新在线| 欧美伦理91i| 欧美韩日一区二区三区| 国产亚洲欧美一区| 亚洲欧美国产三级| 午夜精品久久久久久久99黑人| 亚洲女人天堂成人av在线| 欧美高清视频| 亚洲国产欧美日韩| 亚洲电影在线| 久久女同精品一区二区| 久久精彩免费视频| 国产一区二区av| 性视频1819p久久| 久久精品国产亚洲5555| 欧美视频福利| 亚洲最新视频在线播放| 亚洲网在线观看| 欧美视频一区二区在线观看| 亚洲精品视频在线观看免费| 99精品国产高清一区二区| 欧美精品xxxxbbbb| 亚洲最新在线视频| 欧美在线free| 一区在线免费观看| 久久网站免费| 亚洲国产你懂的| 日韩亚洲欧美成人一区| 欧美性感一类影片在线播放| 亚洲一区影院| 久久精品亚洲一区二区三区浴池| 国产午夜亚洲精品羞羞网站| 欧美一区二区在线视频| 久久国产一区| 亚洲国产老妈| 欧美日韩一区在线| 欧美一级夜夜爽| 欧美国产免费| 这里是久久伊人| 国产精品一页| 免费看的黄色欧美网站| 日韩一区二区精品葵司在线| 亚洲欧美日韩直播| 激情综合激情| 欧美日本乱大交xxxxx| 亚洲天堂av图片| 日韩视频在线观看一区二区| 99pao成人国产永久免费视频| 欧美激情小视频| 亚洲一区在线直播| 久久青草久久| 亚洲香蕉视频| 黄色欧美成人| 欧美日韩亚洲一区二区三区在线| 性欧美18~19sex高清播放| 免费一区二区三区| 亚洲欧美一区二区视频| 亚洲第一区在线观看| 欧美性事在线| 久久综合久久久| 亚洲午夜精品视频| 亚洲国产精品久久久| 欧美在线视频观看| 制服诱惑一区二区| 亚洲黄色成人网| 国产日韩欧美综合精品| 欧美日韩不卡合集视频| 久久久久亚洲综合| 小黄鸭视频精品导航| 亚洲破处大片| 久久综合色婷婷| 久久激情综合网| 午夜精品久久| 亚洲一区二区伦理| 日韩视频一区二区三区在线播放免费观看| 国产精品一区二区久久精品| 欧美日韩国产专区| 美女免费视频一区| 久久久久看片| 久久精品免费|