x64 command line build cleanup
64-bit linker had a number of warnings that the 32-bit linker did not. It turned out to be because the 64-bit compiler is more picky about declaring DLL exports 2-different ways, even if they are essentially the same. The 32-bit linkder didn't complain. It is described here: http://support.microsoft.com/kb/835326 The warnings that this suppresses are: nhdefkey.c Linking hdefkey.dll Microsoft (R) Incremental Linker Version 10.00.40219.01 Copyright (C) Microsoft Corporation. All rights reserved. nhdefkey.o : warning LNK4197: export 'ProcessKeystroke' specified multiple times; using first specification nhdefkey.o : warning LNK4197: export 'NHkbhit' specified multiple times; using first specification nhdefkey.o : warning LNK4197: export 'CheckInput' specified multiple times; using first specification nhdefkey.o : warning LNK4197: export 'SourceWhere' specified multiple times; using first specification nhdefkey.o : warning LNK4197: export 'SourceAuthor' specified multiple times; using first specification nhdefkey.o : warning LNK4197: export 'KeyHandlerName' specified multiple times; using first specification Creating library o\nhdefkey.lib and object o\nhdefkey.exp nh340key.c Linking h340key.dll nh340key.o : warning LNK4197: export 'ProcessKeystroke' specified multiple times; using first specification nh340key.o : warning LNK4197: export 'NHkbhit' specified multiple times; using first specification nh340key.o : warning LNK4197: export 'CheckInput' specified multiple times; using first specification nh340key.o : warning LNK4197: export 'SourceWhere' specified multiple times; using first specification nh340key.o : warning LNK4197: export 'SourceAuthor' specified multiple times; using first specification nh340key.o : warning LNK4197: export 'KeyHandlerName' specified multiple times; using first specification Creating library o\nh340key.lib and object o\nh340key.exp nhraykey.c Linking hraykey.dll nhraykey.o : warning LNK4197: export 'ProcessKeystroke' specified multiple times; using first specification nhraykey.o : warning LNK4197: export 'CheckInput' specified multiple times; using first specification nhraykey.o : warning LNK4197: export 'NHkbhit' specified multiple times; using first specification nhraykey.o : warning LNK4197: export 'SourceWhere' specified multiple times; using first specification nhraykey.o : warning LNK4197: export 'SourceAuthor' specified multiple times; using first specification nhraykey.o : warning LNK4197: export 'KeyHandlerName' specified multiple times; using first specification Creating library o\nhraykey.lib and object o\nhraykey.exp
This commit is contained in:
@@ -233,13 +233,13 @@ LIBS= user32.lib winmm.lib $(ZLIB)
|
||||
!IF ("$(GRAPHICAL)"=="Y")
|
||||
|
||||
cflagsGame = $(cdebug) $(cflags2) $(guiflags) $(INCLDIR) \
|
||||
$(WINPFLAG) $(DLBFLG) $(GAMEPDBFILE) $(GAMEMAPFILE) /W3
|
||||
$(WINPFLAG) $(DLBFLG) $(GAMEPDBFILE) $(GAMEMAPFILE)
|
||||
lflagsGame = $(ldebug) $(lflags) $(guilibs)
|
||||
|
||||
!ELSE
|
||||
|
||||
cflagsGame = $(cdebug) $(cflags2) $(conflags) $(INCLDIR) \
|
||||
$(WINPFLAG) $(DLBFLG) $(GAMEPDBFILE) $(GAMEMAPFILE) /W3
|
||||
$(WINPFLAG) $(DLBFLG) $(GAMEPDBFILE) $(GAMEMAPFILE)
|
||||
lflagsGame = $(ldebug) $(lflags) $(conlibs)
|
||||
|
||||
!ENDIF
|
||||
@@ -626,49 +626,22 @@ $(O)gamedir.tag:
|
||||
@if not exist $(GAMEDIR)\*.* mkdir $(GAMEDIR)
|
||||
@echo directory created > $@
|
||||
|
||||
$(O)nhdefkey.def:
|
||||
@echo EXPORTS >$@
|
||||
@echo ProcessKeystroke >>$@
|
||||
@echo NHkbhit >>$@
|
||||
@echo CheckInput >>$@
|
||||
@echo SourceWhere >>$@
|
||||
@echo SourceAuthor >>$@
|
||||
@echo KeyHandlerName >>$@
|
||||
|
||||
$(GAMEDIR)\nhdefkey.dll : $(O)$(@B).o $(O)gamedir.tag $(O)$(@B).def
|
||||
$(GAMEDIR)\nhdefkey.dll : $(O)$(@B).o $(O)gamedir.tag
|
||||
@echo Linking $@
|
||||
@$(link) $(ldebug) /RELEASE /DLL user32.lib \
|
||||
/PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).map" /DEF:$(O)$(@B).def \
|
||||
/PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).map" \
|
||||
/IMPLIB:$(O)$(@B).lib -out:$@ $(O)$(@B).o
|
||||
|
||||
$(O)nh340key.def:
|
||||
@echo EXPORTS >$@
|
||||
@echo ProcessKeystroke >>$@
|
||||
@echo NHkbhit >>$@
|
||||
@echo CheckInput >>$@
|
||||
@echo SourceWhere >>$@
|
||||
@echo SourceAuthor >>$@
|
||||
@echo KeyHandlerName >>$@
|
||||
|
||||
$(GAMEDIR)\nh340key.dll : $(O)$(@B).o $(O)gamedir.tag $(O)$(@B).def
|
||||
$(GAMEDIR)\nh340key.dll : $(O)$(@B).o $(O)gamedir.tag
|
||||
@echo Linking $@
|
||||
@$(link) $(ldebug) /RELEASE /NOLOGO /DLL user32.lib \
|
||||
/PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).map" /DEF:$(O)$(@B).def \
|
||||
/PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).map" \
|
||||
/IMPLIB:$(O)$(@B).lib -out:$@ $(O)$(@B).o
|
||||
|
||||
$(O)nhraykey.def:
|
||||
@echo EXPORTS >$@
|
||||
@echo ProcessKeystroke >>$@
|
||||
@echo NHkbhit >>$@
|
||||
@echo CheckInput >>$@
|
||||
@echo SourceWhere >>$@
|
||||
@echo SourceAuthor >>$@
|
||||
@echo KeyHandlerName >>$@
|
||||
|
||||
$(GAMEDIR)\nhraykey.dll : $(O)$(@B).o $(O)gamedir.tag $(O)$(@B).def
|
||||
$(GAMEDIR)\nhraykey.dll : $(O)$(@B).o $(O)gamedir.tag
|
||||
@echo Linking $@
|
||||
@$(link) $(ldebug) /RELEASE /NOLOGO /DLL user32.lib \
|
||||
/PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).map" /DEF:$(O)$(@B).def \
|
||||
/PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).map" \
|
||||
/IMPLIB:$(O)$(@B).lib -out:$@ $(O)$(@B).o
|
||||
|
||||
#
|
||||
@@ -907,8 +880,8 @@ $(O)obj.tag:
|
||||
|
||||
envchk:
|
||||
! IF "$(CL)"!=""
|
||||
@echo Warning, the CL Environment variable is defined:
|
||||
@echo CL=$(CL)
|
||||
# @echo Warning, the CL Environment variable is defined:
|
||||
# @echo CL=$(CL)
|
||||
! ENDIF
|
||||
! IF "$(GRAPHICAL)"=="Y"
|
||||
@echo ----
|
||||
|
||||
Reference in New Issue
Block a user