使用Open Watcom编译16位Windows DLL

时间:2017-11-08 16:29:38

标签: dll x86-16 watcom

我正在尝试为此for this question on the reverseengineering stackexchange编译一个16位Windows DLL。

以下是我的绝对最小源文件:

mydll.c

int main (int reason) {
  return 0;
}

mydll.lnk

FORMAT WINDOWS DLL

LIBPATH .\openwatcom\lib286
LIBPATH .\openwatcom\lib286\win

LIBRARY windows

FILE mydll.obj
NAME mydll

我是他们使用以下两个命令来编译和链接DLL。

# Build
openwatcom\binnt\wcc.exe -i='openwatcom\h;openwatcom\h\win' -bd -w4 -d2 -zu -bt=windows -fo=.obj -ml mydll.c

# Link
openwatcom\binnt\wlink.exe @mydll.lnk

但由于某种原因,链接步骤失败并显示以下消息:

Error! E2028: __DLLstart_ is an undefined reference
Error! E2028: __fpmath is an undefined reference
creating a Windows dynamic link library
file clibl.lib(sigfpe.c): undefined symbol __fpmath

我的目标只是能够构建一个16位的DLL文件,最好是在我的Mac上使用wine,但我也有一台Windows XP虚拟机也是可以接受的。

0 个答案:

没有答案