Getting exception while compiling in 64bit visual studio 9.0 sp1

301 views Asked by At

I am getting exception while compiling my cpp code in 64bit, same code is working fine while compiling with 32bit.

I am using "Microsoft Visual Studio 9.0 sp1"

Error which I am getting is:

cl.exe /Zi /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "_WINDLL" /D "_MBCS" /D "UNICODE" /EHsc /TP /nologo /c /Foobjs\DLLVersionCheck.obj /MT -Iinclude -I"C:\Program Files\j2sdk1.4.1_02\include" -I"C:\Program Files\j2sdk1.4.1_02\include\win32" /Tp src\DLLVersionCheck.cpp DLLVersionCheck.cpp

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\crtdefs.h(560) : error C2485: 'deprecated' : unrecognized extended attribute

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\stdio.h(237) : error C2485: 'deprecated' : unrecognized extended attribute

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\stdio.h(252) : error C2485: 'deprecated' : unrecognized extended attribute

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\stdio.h(256) : error C2485: 'deprecated' : unrecognized extended attribute

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\stdio.h(257) : error C2485: 'deprecated' : unrecognized extended attribute

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\stdio.h(259) : warning C4616: #pragma warning : warning number '6530' out of range, must be between '4001' and '4999'

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\stdio.h(278) : error C2265: '' : reference to a zero-sized array is illegal

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\stdio.h(279) : warning C4003: not enough actual parameters for macro '__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_0_EX'

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\stdio.h(279) : warning C4003: not enough actual parameters for macro '_CRT_INSECURE_DEPRECATE'

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\stdio.h(279) : error C2485: 'deprecated' : unrecognized extended attribute

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\stdio.h(279) : error C2144: syntax error : missing ';' before type 'char'

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\stdio.h(279) : error C2501: 'gets' : missing storage-class or type specifiers

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\stdio.h(279) : fatal error C1004: unexpected end of file found NMAKE : fatal error U1077: 'cl.exe' : return code '0x2' Stop.

I am using makefile for copiling this code:

# ------------- Directory path for source files -------------
SRC_DIR=src

# ------------- Directory Path for header files -------------
INC_DIR=include

# ------------- Directory Path for object files -------------
OBJ_DIR=objs

# ------------- Directory Path for binary files -------------
DLL_DIR=dll

# ------------- Include directories -------------------
INC= -I$(INC_DIR) -I"$(JAVA_HOME)\include" -I"$(JAVA_HOME)\include\win32" 

# ------------- Other Included Libraries -------------------
OTHER_INC=advapi32.lib shell32.lib version.lib Msi.lib

# ------------- Compiler to compile source files ------------
COMPILER=cl.exe

# ------------- Compiler options -------------
COMP_OPT1= /Zi /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "_WINDLL" /D "_MBCS" /D "UNICODE" /EHsc \
         /TP /nologo /c /Fo$@ /MT

# ----------- Linker name to create executable ---------
LINKER_NAME=link.exe

# -------------- Linker Options -------------
LINKER_OPT=/NOLOGO /DLL /SUBSYSTEM:CONSOLE /OUT:$@

all: make_dir $(DLL_DIR)\ManageEngineExDLLVersionCheck.dll

clean: clean_dll

make_dir:
    - mkdir $(DLL_DIR)
    - mkdir $(OBJ_DIR)

clean_dll:
    - rm -rf $(DLL_DIR)
    - rm -rf $(OBJ_DIR)

# ------------- Compilation commands -------------

$(OBJ_DIR)\DLLVersionCheck.obj: $(SRC_DIR)\DLLVersionCheck.cpp
    $(COMPILER) $(COMP_OPT1) $(INC) /Tp $(SRC_DIR)\DLLVersionCheck.cpp

$(OBJ_DIR)\ManageEngineExDLLVersionCheck.obj: $(SRC_DIR)\ManageEngineExDLLVersionCheck.cpp
    $(COMPILER) $(COMP_OPT1) $(INC) /Tp $(SRC_DIR)\ManageEngineExDLLVersionCheck.cpp


$(OBJ_DIR)\*.obj:       $(OBJ_DIR)\DLLVersionCheck.obj \
                $(OBJ_DIR)\ManageEngineExDLLVersionCheck.obj
$(DLL_DIR)\ManageEngineExDLLVersionCheck.dll: $(OBJ_DIR)\*.obj
    $(LINKER_NAME) $(LINKER_OPT)    \
                $(OBJ_DIR)\DLLVersionCheck.obj \
                $(OBJ_DIR)\ManageEngineExDLLVersionCheck.obj \
                $(OTHER_INC)


#*************************************************************************
#                           End of Makefile
#*************************************************************************
0

There are 0 answers