makefile_msvc文件的内容:
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
all: dlgsdk.exe
@echo "ALL"
dlgsdk.exe: dlgsdk.obj dlg.res
link dlgsdk.obj dlg.res kernel32.lib user32.lib
mt.exe /manifest XP.style.manifest /outputresource:dlgsdk.exe;1
dlgsdk.obj: dlgsdk.c
cl /c -FA -DWIN32 dlgsdk.c
dlg.res: dlg.rc
rc dlg.rc
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
使用makefile_msvc作为makefile文件,编译过程中的错误信息打印到 err.txt 文件
nmake /f makefile_msvc /x err.txt
如何编译库文件
cl /LDd math.c //debug版本cl /LD math.c //debug版本
生成了math.lib math.dll文件
查看库文件
dumpbin /exports math.dll
cl /c dll_test.c /link math.lib
dumpbin /imports math.dll