Index: win/rules.vc ================================================================== --- win/rules.vc +++ win/rules.vc @@ -185,14 +185,19 @@ COMPILERFLAGS = $(COMPILERFLAGS) -QIA64_Bx !else !message *** Compiler does not have 'B-stepping errata workarounds' !endif !endif + +# Prevents "LNK1561: entry point must be defined" error compiling from VS-IDE: +!ifndef LINKER_TESTFLAGS +LINKER_TESTFLAGS = /DLL /NOENTRY /OUT:nmhlp-out.txt +!endif !if "$(MACHINE)" == "IX86" ### test for -align:4096, when align:512 will do. -!if [nmakehlp -l -opt:nowin98] +!if [nmakehlp -l -opt:nowin98 $(LINKER_TESTFLAGS)] !message *** Linker has 'Win98 alignment problem' ALIGN98_HACK = 1 !else !message *** Linker does not have 'Win98 alignment problem' ALIGN98_HACK = 0 @@ -201,11 +206,11 @@ ALIGN98_HACK = 0 !endif LINKERFLAGS = -!if [nmakehlp -l -ltcg] +!if [nmakehlp -l -ltcg $(LINKER_TESTFLAGS)] LINKERFLAGS =-ltcg !endif #---------------------------------------------------------- # Decode the options requested. @@ -410,11 +415,11 @@ TCL_NO_DEPRECATED = 0 !endif !if [nmakehlp -f $(CHECKS) "fullwarn"] !message *** Doing full warnings check WARNINGS = -W4 -!if [nmakehlp -l -warn:3] +!if [nmakehlp -l -warn:3 $(LINKER_TESTFLAGS)] LINKERFLAGS = $(LINKERFLAGS) -warn:3 !endif !else WARNINGS = -W3 !endif @@ -423,19 +428,19 @@ WARNINGS = $(WARNINGS) -Wp64 !endif !endif !if $(PGO) > 1 -!if [nmakehlp -l -ltcg:pgoptimize] +!if [nmakehlp -l -ltcg:pgoptimize $(LINKER_TESTFLAGS)] LINKERFLAGS = $(LINKERFLAGS:-ltcg=) -ltcg:pgoptimize !else MSG=^ This compiler does not support profile guided optimization. !error $(MSG) !endif !elseif $(PGO) > 0 -!if [nmakehlp -l -ltcg:pginstrument] +!if [nmakehlp -l -ltcg:pginstrument $(LINKER_TESTFLAGS)] LINKERFLAGS = $(LINKERFLAGS:-ltcg=) -ltcg:pginstrument !else MSG=^ This compiler does not support profile guided optimization. !error $(MSG)