- 注册时间
- 2005-2-13
- 最后登录
- 2018-4-24
版主
  
- 积分
- 18
|
发表于 2007-9-9 09:15:56
|
显示全部楼层
不用下,c++ sdk的文件在sdk_engine這個資料夾。
把
afuncs.h, atypes.h, avars.h, adll.h - header files
acknex.cpp - source code of acknex.exe
acknex.lib - library for using acknex.dll
複製到c++ project的文件夾,
//main.cpp
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>
#include "adll.h"
int APIENTRY WinMain(HINSTANCE hInstance, // application instance handle
HINSTANCE hPrevInstance, // always zero
LPTSTR lpCmdLine, // application command line
int nCmdShow) // window flags
{
engine_open("arena.wmb");
while (engine_frame());
engine_close();
return 0;
}
//compile source
最後在command prompt到wed的路徑執行wed.exe,使用指令WED -p path\\executable.exe建立一個acknex.dll到c++ project。
使用sdk挺麻煩的,每次編譯出exe麵要bind一個新的acknex.dll,測試運行非常麻煩。 |
|