Windows XP and a link error

Status
Not open for further replies.

addy

Beta member
Messages
1
Hi everybody,

I need to build a project in C++ under Windows XP. This project implements a video driver. I get the following link error:

enable.obj : warning LNK4210: .CRT section exists; there may be unhandled static initializers or terminators
LINK : error LNK1218: warning treated as error; no output file generated.

The project is too big to check and take out all functions that possible need C++ Run Time library, so this is not a solution.

Same project can be compiled and linked under Windows 2000.

Source file used for build look currently like this:

TARGETNAME=...
TARGETPATH=obj
TARGETTYPE=GDI_DRIVER
USER_C_FLAGS=/TP

!IFDEF NTDEBUG
MSC_OPTIMIZATION=/Od
!ELSE
MSC_OPTIMIZATION=/Ox
!ENDIF

!IFNDEF MSC_WARNING_LEVEL
MSC_WARNING_LEVEL=/W3
!ENDIF

AXP64_FLAGS=/QA21164

LINKER_FLAGS=$(LINKER_FLAGS) /map /verbose /NODEFAULTLIB

!IF $(386)
MSC_WARNING_LEVEL=$(MSC_WARNING_LEVEL)
USER_C_FLAGS=/TP
!ELSEIF $(MIPS)
MSC_WARNING_LEVEL=$(MSC_WARNING_LEVEL) /WX
!ELSEIF $(ALPHA) || $(AXP64)
MSC_WARNING_LEVEL=$(MSC_WARNING_LEVEL) /WX
!ELSEIF $(PPC)
MSC_WARNING_LEVEL=$(MSC_WARNING_LEVEL) /WX
!ENDIF

INCLUDES=$(DDK_INC_PATH);

USE_LIBCNTPR = 1

GDI_DRIVER_LIBS=$(DDK_LIB_PATH)\libcntpr.lib


SOURCES= ....................

I tried to reduce MSC_WARNING_LEVEL to W2 or W1, but it had no result.

I am thinking to other 2 solutions:
1. decreasing Windows XP's warning level;
2. another linker option

Does anybody have any ideas about how to do these? Or any other ideas?

Thanks a lot.
Addy.
 
Have you resolved this linker issue? I'm encountering a similar problem and would like to know if you have any suggestions.

Thanks!
 
Status
Not open for further replies.
Back
Top Bottom