CRT section Error!



The project compiles successfully when I use the Visual studio+DDK enviroment
but gives this error on the DDK command line enviroment.On compiling I am
getting this error
error LNK1218: warning treated as error; no output file generated

The file warning file elaborates on the error.
cpprt.obj : warning LNK4210: .CRT section exists; there may be unhandled
static initializers or terminator.

The sources file
+++++++++++++++++++++++++++++++++++++++++++++++++++
# sources file for use with DDK BUILD utility
#
# File created on 3/16/2005
#
TARGETNAME = CardReader
TARGETPATH = obj
TARGETTYPE = DRIVER
DRIVERTYPE = WDM

#uncomment the following line to build with C++ compiler
#USECXX_FLAG=/Tp

!IF ("$(DDKBUILDENV)"=="chk") || ("$(DDKBUILDENV)"=="checked")
BUILDTYPE = CHECKED
!ELSE
BUILDTYPE = FREE
NTDEBUG=
!ENDIF


# Singly linked lists have been optimized in a non-back
# compatible way for XP and later platforms. As such,
# any binary built with the XP or later DDK and using
# singly linked lists will not load on 2000 and earlier
# platforms without the use of the following define in
# the build. This define turns off the new optimizations,
# and thus it should only be used for cross-platform
# binaries.
#C_DEFINES =$(C_DEFINES) -D_WIN2K_COMPAT_SLIST_USAGE


!if !defined(DDK_TARGET_OS) || "$(DDK_TARGET_OS)"=="Win2K"
C_DEFINES =$(C_DEFINES) -DWIN2K
!endif

MSC_WARNING_LEVEL=/W1

TARGETLIBS=$(DDK_LIB_PATH)\ntstrsafe.lib $(DDK_LIB_PATH)\csq.lib
USE_PDB=1

# ntstrsafe.h is in DDK_INC_PATH even for WDM driver
INCLUDES=$(INCLUDE);$(DDK_INC_PATH)
#TARGETLIBS=$(TARGETLIBS) $(DDK_LIB_PATH)\ntoskrnl.lib

#TARGETLIBS=$ C:\WINDDK\3790\lib\wxp\i386\ntstrsafe.lib
#TARGETLIBS=$(TARGETLIBS) $(DDK_LIB_PATH)\msvcrt4d.lib
#TARGETLIBS=$(TARGETLIBS) $(DDK_LIB_PATH)\libc.lib
#TARGETLIBS=$(TARGETLIBS) $(DDK_LIB_PATH)\libcd.lib
#TARGETLIBS=$(TARGETLIBS) $(DDK_LIB_PATH)\libcmt.lib

SOURCES=CardReader.rc \
registry.cpp \
debug.cpp \
CardReader.cpp \
wmi.cpp \
iorw.cpp \
queue.cpp \
cpprt.cpp \
pnp.cpp \
ComPort.cpp \
DataBufferQueue.cpp \
power.cpp

#PRECOMPILED_INCLUDE=pch.h
#PRECOMPILED_PCH=pch.pch
#PRECOMPILED_OBJ=pch.obj

#
# setup visualC++ source browsing
#
BROWSER_INFO=1
BSCMAKE_FLAGS=$(BSCMAKE_FLAGS) -n
LINKER_FLAGS = -MAP
#CARDREADER_WMI_TRACE=1

!ifdef CARDREADER_WMI_TRACE

C_DEFINES =$(C_DEFINES) -DCARDREADER_WMI_TRACE

!if ("$(PRECOMPILED_CXX)" == "") && ("$(USECXX_FLAG)" == "")
RUN_WPP=$(SOURCES)\
-km \
-func:DbgLog(AREA,LEVEL,MSG,...)
!else
RUN_WPP=$(SOURCES)\
-km -dll\
-func:DbgLog(AREA,LEVEL,MSG,...)
!endif

!endif



.



Relevant Pages