程序在Debug下编译没有问题,可是在release下就出现了以下错误提示:
Deleting intermediate files and output files for project 'CTS5000 - Win32 Release'.
--------------------Configuration: CTS5000 - Win32 Release--------------------
Compiling resources...
Compiling...
StdAfx.cpp
Compiling...
CTS5000.cpp
HDCalc.cpp
Input.cpp
SerialPort.cpp
ShowFrm.cpp
Generating Code...
C:\文档s and Settings\Administrator\桌面\cts-5000\CTS5000-2\ShowFrm.cpp(97) : warning C4700: local variable 'hdc' used without having been initialized
Linking...
CTS5000.obj : error LNK2001: unresolved external symbol _DirectDrawCreate@12
HDCalc.obj : error LNK2001: unresolved external symbol __imp__SetupDiGetDeviceInterfaceDetailA@24
HDCalc.obj : error LNK2001: unresolved external symbol __imp__SetupDiDestroyDeviceInfoList@4
HDCalc.obj : error LNK2001: unresolved external symbol __imp__SetupDiEnumDeviceInterfaces@20
HDCalc.obj : error LNK2001: unresolved external symbol __imp__SetupDiGetClassDevsA@16
Release/CTS5000.exe : fatal error LNK1120: 5 unresolved externals
Error executing link.exe.CTS5000.exe - 6 error(s), 1 warning(s)
以上六个错误的第一个是一个DirectDraw的创建函数,我看了msdn以后觉得没什么问题啊,另外五个错误也看不出是什么意思,希望各位达人指点。那个警告是一个变量声明了以后没有使用,应该不会有什么影响。