I'm trying to compile a 16-bit Windows DLL for this for this question on the reverseengineering stackexchange.
Below is my absolute minimum source files:
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
I'm them using the following two commands to compile and link the 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
But for some reason the linking steps fails with the following messages:
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
My goal is just to be able to build a 16 bit DLL file, preferably from wine on my Mac, but I also have a Windows XP virtual machine so that's acceptable as well.