missing constants on mingw build fix
Errors seen during build: o/windmain.o:windmain.c:(.rdata$.refptr.FOLDERID_ProgramData[.refptr.FOLDERID_ProgramData]+0x0): undefined reference to `FOLDERID_ProgramData' o/windmain.o:windmain.c:(.rdata$.refptr.FOLDERID_LocalAppData[.refptr.FOLDERID_LocalAppData]+0x0): undefined reference to `FOLDERID_LocalAppData' o/windmain.o:windmain.c:(.rdata$.refptr.FOLDERID_Profile[.refptr.FOLDERID_Profile]+0x0): undefined reference to `FOLDERID_Profile' collect2.exe: error: ld returned 1 exit status mingw32-make: *** [Makefile:849: ../binary/NetHack.exe] Error 1 DEFINE_KNOWN_FOLDER is using this particular definition in the mingw header files: rather than this one: So, the known folder values that recent code is using such as FOLDERID_ProgramData, FOLDERID_LocalAppData, and FOLDERID_Profile are being declared as external constants. That is why the error is a link error. We need to include -luuid on the link command line because those external constants are defined in uuid.lib.
This commit is contained in:
@@ -510,7 +510,7 @@ endif
|
||||
CFLAGSBASE = -c $(cflags) $(WINPINC) $(cdebug) $(CURSESDEF)
|
||||
#LFLAGSBASEC = $(linkdebug)
|
||||
#LFLAGSBASEG = $(linkdebug) -mwindows
|
||||
baselibs = -lwinmm -lshell32 -lole32
|
||||
baselibs = -lwinmm -lshell32 -lole32 -luuid
|
||||
conlibs = -lgdi32 $(baselibs) $(BCRYPT)
|
||||
guilibs = -lcomctl32 $(baselibs)
|
||||
ifeq "$(WANT_WIN_QT4)" "Y"
|
||||
|
||||
Reference in New Issue
Block a user