View Single Post
Old 30th March 2015, 02:12   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,163
Showing us the exact scons command used would help.

Which SDK are you using with VC toolkit 2003? Platform SDK 2003 Feb. is probably your best bet.

1) SCons is probably not able to find the lib?
2) Are you sure ZLIB_W32 is set correctly? Use File Monitor/Process Monitor to make sure SCons is actually looking in the right place.
3) Newer versions of VS are probably doing something stupid. MakeLangId does not use floating point numbers nor any other CRT function.



I can build with VCTK2003 but I'm using a backdoor to override the Scons VS detection:
Quote:
cd trunk
set ZLIB_W32=c:\....\dep\zlib-win32
scons MSVC_USE_SCRIPT=None MSTOOLKIT=yes MSVS_VERSION=7.1 DOCTYPES=htmlsingle VERSION= VER_MAJOR=3 VER_MINOR= VER_REVISION=4 VER_BUILD=1 PREFIX=c:\....\NSIS SKIPUTILS="NSIS Menu" SKIPPLUGINS=System install
I'm using SCons v1.2.0.r3842 because newer versions never work correctly for me. (Having multiple SDK's and versions of VS on the same machine is not a good idea when trying to fix these build errors)

When using MSVC_USE_SCRIPT=None the PATH, INCLUDE and LIB environment variables have to be set correctly (Use the shortcuts created by the Platform SDK: Windows 2000/XP Release 32-bit etc). Specifically it needs to be able to find cl.exe, link.exe and lib.exe in %PATH% and Windows.h in %INCLUDE%.

I'm using SKIPPLUGINS=System because I did not have the MASM assembler (ml.exe) in %PATH%.

The contents of my zlib folder:
Quote:
\zlib-win32\zlib1.dll
\zlib-win32\include\zconf.h
\zlib-win32\include\zlib.h
\zlib-win32\lib\zdll.lib
\zlib-win32\lib\zlib.lib
(I may have built these myself, I don't remember)



I would generally not recommend that people use MSVC_USE_SCRIPT but it can be helpful if you cannot get SCons to operate correctly. It seems to be a rather undocumented parameter and depends on your SCons version. If you also use MSTOOLKIT=yes then it will use our custom implementation of this feature (YMMV).



It is important that you delete .sconsign.dblite and the .sconf_temp directory when trying to fix the libcp.lib and zlib errors because SCons caches config data. Checking config.log might also provide some clues...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote