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

聚星亭

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

       SDK/angelscript/projects目錄中,您可以找到許多流行編譯器的相關項目文件(原文: 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),并將工程按照本文件進行設置(原文: and that the project settings are set according to this article.

,

       如果你找不到符合你編譯器的工程文件,你可以通過添加sdk/angelscript/source目錄下的全部文件到你的工程,并且對項目作適當的配置(原文: 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.      編譯時的選項設置(Set compile time options

       創建as_config.h頭文件是為了使本代碼盡可能的包含不同的編譯環境(原文: The code tries to contain compiler differences in as few places as possible. The header as_config.h was created for that purpose.)。為了支持不同的編譯器,你可能會發現一些 #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.)。

 

    當在編譯這個庫時有一些 #defines 宏定義需要改寫,比如寫你應該定義一個ANGELSCRIPT_EXPORT宏以便導出庫函數(原文: 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.)。當然,如果在你的工程中包含了庫源代碼目錄的話就不用定義這個標記了(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.)。盡管不能保證支持向后兼容,但是應盡可能的移除不支持的功能(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.      關聯腳本庫(Linking with the library)

       有四種方法可以編譯并連接AngelScript(原文: There are four ways of compiling and linking with AngelScript in order to use it.),我推薦把它連接成靜態庫(原文: I recommend linking with a static library.)。請注意,你只需要少許改動代碼這四種方法就可以相互轉換了(原文:Note that all four ways are interchangable with only a small change in your code,),即 在包含頭文件之前先定義一個標記,然后可能需要手工加載一個DLL(原文: i.e a defined flag before including the header file, and possibly a routine for manually loading the dll.)?!窘酉聛戆凑障旅嫣峁┑娜魏我环N方案操作都一樣(原文: The rest of your code should look exactly the same for each of the alternatives.)?!?/span>

 

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

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

這樣的好處是可以保證腳本庫和宿主應用程序都使用相同的編譯選項(原文: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(應該翻譯成C運行時么?)是多線程還是單線程(原文: e.g. multi-threaded or single-threaded CRT.)。缺點就是你的工程將包含有庫文件(原文: The disadvantage is that your project will be poluted with the library files.)

這些文件要使用這個腳本庫,可能需要包含angelscript.h頭再就不需要別的特殊設置了(原文: 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. 編譯一個靜態庫并連接到工程中(Compile a static library and link into project)

 

       極力推薦把它編譯成一個靜態庫并連接到自己的工程中(原文: The most recommended way is to compile a static library that your project will link with.)。在編譯靜態庫的時候必須先設置好編譯選項以免與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.)。例如:如果腳本庫使用動態鏈接多線程的CRT而你的應用程序采用單線程的靜態鏈接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中設置這些)

      

       接下來,要使用腳本庫你只需要包含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. 編譯一個導入庫的動態鏈接庫Compile a dynamically loaded library with an import library

       使用Microsoft Visual C + +就可以編譯導入庫動態加載庫(原文: With Microsoft Visual C++ it is possible to compile a dynamically loaded library with an import library.)。導入庫, 加載需要的DLL并綁定函數(原文: 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. 手工載入動態連接庫(Load the dynamically loaded library manually

       如果你想使用DLL,例如 在應用程序之間共享代碼,我建議手工載入這個庫,這樣基本上所有的加載或綁定錯誤都可以得到緩解(原文: 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.)。這樣可以確保在頭文件中不用聲明函數原型,同樣就可以通過函數指針來使用這些的名字(原文: 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"

 

// 聲明函數指針

typedef asIScriptEngine * AS_CALL t_asCreateScriptEngine(int);

t_asCreateScriptEngine *asCreateScriptEngine = 0;

 

// ... 聲明其余函數

 

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

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

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

// 綁定其它函數

// 使用本腳本庫

 

                                                                                                        ---------  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>
            欧美国产欧美亚州国产日韩mv天天看完整 | 欧美久久久久久久久久| 一区视频在线| 亚洲视频专区在线| 9国产精品视频| 亚洲另类在线一区| 日韩一区二区精品| 久久五月婷婷丁香社区| 久久久蜜臀国产一区二区| 久久久久久久激情视频| 久久久久免费视频| 免费欧美在线| 亚洲国产欧美在线人成| 久久午夜国产精品| 欧美国产在线观看| 亚洲精品综合久久中文字幕| 亚洲私人黄色宅男| 中文一区二区| 亚洲一区二区欧美| 久久综合久久综合这里只有精品 | 久久久久久久91| 久久国产综合精品| 欧美久色视频| 国产一区二区三区高清| 亚洲国内高清视频| 亚洲无玛一区| 久久久久久久一区| 日韩亚洲欧美一区| 久久综合伊人| 国产精品综合| 亚洲精品一区二区三区不| 亚洲欧美激情一区二区| 免费观看30秒视频久久| 艳妇臀荡乳欲伦亚洲一区| 亚洲欧美国产另类| 每日更新成人在线视频| 国产精品青草综合久久久久99 | 日韩午夜在线| 久久久精品动漫| 亚洲精品欧美专区| 久久国产精品一区二区| 国产精品videosex极品| 亚洲精品老司机| 久久综合久久88| 午夜久久黄色| 欧美网站在线观看| 99在线视频精品| 亚洲成人在线视频播放 | 亚洲欧美高清| 欧美激情1区2区3区| 亚洲精选视频免费看| 亚洲男女毛片无遮挡| 久久婷婷国产综合国色天香| 在线综合亚洲欧美在线视频| 噜噜噜久久亚洲精品国产品小说| 国产精品网站在线观看| 在线观看91精品国产入口| 99国产成+人+综合+亚洲欧美| 久久久午夜电影| 欧美一区二区三区啪啪| 国产精品久久久久久久久久久久久| 亚洲人成啪啪网站| 欧美激情视频一区二区三区在线播放 | 亚洲自拍偷拍色片视频| 欧美精品在线免费播放| 亚洲国产一二三| 女人色偷偷aa久久天堂| 久久九九免费视频| 黄色免费成人| 欧美高清视频在线播放| 麻豆精品一区二区综合av| 亚洲国产精品电影在线观看| 蜜臀av性久久久久蜜臀aⅴ四虎| 欧美一区亚洲二区| 樱花yy私人影院亚洲| 欧美成人精精品一区二区频| 久久综合伊人77777尤物| 亚洲人成在线观看一区二区| 亚洲欧洲精品成人久久奇米网| 欧美激情精品久久久久久变态 | 久久久亚洲一区| 久久国产一区| 亚洲人成精品久久久久| 中文国产一区| 韩日午夜在线资源一区二区| 免费在线欧美视频| 欧美精品激情blacked18| 亚洲欧美欧美一区二区三区| 午夜日韩电影| 亚洲欧洲视频| 亚洲制服av| 亚洲国产成人tv| 一本大道久久a久久精品综合| 国产伦精品一区二区三区免费| 久久久久一区二区三区| 美女脱光内衣内裤视频久久影院| 亚洲精品免费观看| 亚洲小说春色综合另类电影| 韩国久久久久| 亚洲免费av网站| 韩国三级在线一区| 一本色道久久加勒比精品| 在线不卡中文字幕播放| 一本久久综合亚洲鲁鲁| 亚洲第一成人在线| 亚洲一区精彩视频| 亚洲三级视频| 亚洲视频中文字幕| 亚洲伦伦在线| 精品福利电影| 亚洲影视在线| 亚洲欧洲精品一区二区| 99re在线精品| 亚洲国产日韩在线| 性高湖久久久久久久久| 亚洲一区国产视频| 欧美电影免费| 免费成人高清| 国产有码一区二区| 亚洲一级黄色| 99在线精品视频| 欧美成年人视频网站| 久久精品视频99| 国产精品伦一区| 亚洲青色在线| 国产欧美视频在线观看| 在线视频欧美日韩| 一本一道久久综合狠狠老精东影业| 久久精品成人一区二区三区蜜臀| 亚洲在线网站| 国产精品ⅴa在线观看h| 日韩视频中文| 亚洲一区二区三区在线视频| 欧美片网站免费| 欧美 日韩 国产精品免费观看| 国产精品亚洲激情| 一本色道久久| 亚洲视频精品| 欧美偷拍另类| 国产精品99久久久久久久久| 亚洲小视频在线| 国产精品久久久爽爽爽麻豆色哟哟| 91久久极品少妇xxxxⅹ软件| 亚洲精选91| 国产精品视频免费一区| 亚洲一区二区视频在线| 亚洲女优在线| 国产精品色婷婷久久58| 国产精品99久久久久久久久 | 欧美激情一区二区三区在线视频| 欧美福利电影网| 亚洲精品五月天| 欧美亚洲不卡| 欧美伊人久久| 亚洲黄色免费电影| 亚洲一区二区高清| 国产区二精品视| 免费一级欧美片在线观看| 亚洲精品一区二区三区福利| 亚洲欧美日韩精品| 国内精品一区二区| 欧美aⅴ99久久黑人专区| 亚洲美女av在线播放| 亚洲一区免费观看| 国产一区日韩欧美| 免费看成人av| 亚洲少妇中出一区| 久久一区二区三区四区五区| 亚洲青涩在线| 国产精品一区二区久久| 久久久久免费视频| 亚洲看片网站| 久久久久看片| 亚洲视频综合| 久久久www成人免费无遮挡大片| 两个人的视频www国产精品| 久久久精品tv| 午夜精品影院在线观看| 久久精品一区二区三区中文字幕 | 亚洲网站啪啪| 欧美一级理论片| 亚洲精品国产精品国自产在线| 女仆av观看一区| 久久久一本精品99久久精品66| 国产一区二区三区久久| 日韩亚洲成人av在线| 亚洲视频在线观看三级| 欧美三级小说| 一本一本a久久| 亚洲美女福利视频网站| 国产精品女人久久久久久| 中文av一区二区| 亚洲欧洲视频在线| 国产精品ⅴa在线观看h| 亚洲精品日韩综合观看成人91| 免费看黄裸体一级大秀欧美| 欧美激情中文字幕在线| av成人免费在线| 午夜精品理论片| 韩日欧美一区二区三区|