Cygwin下编译DynaHack

一.以下依赖库是必须安装的

gcc
make
cmake
flex
bison
libncursesw-devel
git
zlib-devel

二.DynaHack用的是CMake构建系统

cd ~/dynahack
mkdir build
cd ~/dynahack/build
cmake ..

三.还不算完,还需用CMake的图形界面详细配置下路径

cd ~/dynahack/build
ccmake .

SHELLDIR and CMAKE_INSTALL_PREFIX =
/home/username/dynahack/install
BINDIR, DATADIR and LIBDIR =
/home/username/dynahack/install/dynahack-data

C进行配置,按G生成所有build文件,至此CMake配置好了~

四.编译

cd ~/dynahack/build
make install

哈哈,遇到链接时strcmpi 出错,原来是posix兼容系统不是这个API 需要用strcasecmp

五.修改nitrohack_types.h

#ifdef WIN32
# undef UNIX
    #define STRNCMPI
    #define STRCMPI
#else
    #define strncmpi strncasecmp
    #define strcmpi strcasecmp
#endif

你可能感兴趣的:(Cygwin下编译DynaHack)