Instructor
9th October 2005 11:45 UTC
Compile NSIS 2.10 problem
I have installed:
python-2.4.1
scons-0.96.91
VCToolkit
Windows Server 2003 SP1 Platform SDK
Build.bat (in the NSIS source directory):
@ECHO OFF
set MSSDK=D:\Program Files\Microsoft Platform SDK
set VCToolkitInstallDir=D:\Program Files\Microsoft Visual C++ Toolkit 2003
set Python=D:\Python24
set PATH=%Python%;%PATH%
set INCLUDE=%MSSDK%\include;%INCLUDE%
set LIB=%MSSDK%\lib;%LIB%
scons MSTOOLKIT=yes
But there are errors when I try to compile:
scons: Reading SConscript files ...
Delete("nsis-09-Oct-2005.cvs")
Delete(".instdist")
Delete(".test")
Using Microsoft tools configuration
Checking for main() in C library gdi32... (cached) no
Checking for main() in C library user32... (cached) no
Checking for main() in C library version... (cached) no
Checking for main() in C library pthread... (cached) no
Checking for main() in C library stdc++... (cached) no
Checking for main() in C library iconv... (cached) no
Checking for main() in C library dl... (cached) no
Checking for main() in C++ library cppunit... (cached) no
scons: done reading SConscript files.
scons: Building targets ...
cl /nologo /O1 /W3 /c Contrib\AdvSplash\advsplash.c /Fobuild\release\AdvSplash\a
dvsplash.obj
advsplash.c
Contrib\AdvSplash\advsplash.c(214) : error C2065: 'LWA_ALPHA' : undeclared ident
ifier
Contrib\AdvSplash\advsplash.c(214) : error C2065: 'LWA_COLORKEY' : undeclared id
entifier
Contrib\AdvSplash\advsplash.c(244) : error C2065: 'WS_EX_LAYERED' : undeclared i
dentifier
Contrib\AdvSplash\advsplash.c(270) : error C2065: 'DWORD_PTR' : undeclared ident
ifier
Contrib\AdvSplash\advsplash.c(270) : error C2146: syntax error : missing ')' bef
ore identifier 'myWnd'
Contrib\AdvSplash\advsplash.c(270) : error C2144: syntax error : '<Unknown>' sho
uld be preceded by '<Unknown>'
Contrib\AdvSplash\advsplash.c(270) : error C2144: syntax error : '<Unknown>' sho
uld be preceded by '<Unknown>'
Contrib\AdvSplash\advsplash.c(270) : error C2143: syntax error : missing ')' bef
ore 'identifier'
Contrib\AdvSplash\advsplash.c(270) : error C2198: 'timeSetEvent' : too few argum
ents for call through pointer-to-function
Contrib\AdvSplash\advsplash.c(270) : error C2059: syntax error : ')'
scons: *** [build\release\AdvSplash\advsplash.obj] Error 2
scons: building terminated because of errors.
I read in forum about the same error, it was environment variable problem, but why scons don't find liberaries, all paths is ok.
kichik
9th October 2005 13:06 UTC
Does %MSSDK%\Lib\Gdi32.Lib exist? If it doesn't, you might have installed the wrong Platform SDK. There's one that doesn't come with all the libraries and binaries for some weird reason. Maybe it was only for 64-bit. I don't remember right now...
Instructor
9th October 2005 15:24 UTC
I'm confused. "%MSSDK%\Lib\Gdi32.Lib" exists.
kichik
9th October 2005 15:37 UTC
If it exists, it's probably the correct Platform SDK version.
What does config.log show?
Instructor
9th October 2005 16:07 UTC
This is very strange. After I have remove "nsis-2.10-src" and unpack source again (build.bat file the same):
scons: Reading SConscript files ...
Delete("nsis-09-Oct-2005.cvs")
Delete(".instdist")
Delete(".test")
Using Microsoft tools configuration
Checking for main() in C library gdi32... (cached) yes
Checking for main() in C library user32... (cached) yes
Checking for main() in C library version... (cached) yes
Checking for main() in C library pthread... (cached) no
Checking for main() in C library stdc++... (cached) no
Checking for main() in C library iconv... (cached) no
Checking for main() in C library dl... (cached) no
Checking for main() in C++ library cppunit... (cached) no
scons: done reading SConscript files.
scons: Building targets ...
cl /nologo /O1 /W3 /c Contrib\AdvSplash\advsplash.c /Fobuild\release\AdvSplash\a
dvsplash.obj
advsplash.c
Contrib\AdvSplash\advsplash.c(214) : error C2065: 'LWA_ALPHA' : undeclared ident
ifier
Contrib\AdvSplash\advsplash.c(214) : error C2065: 'LWA_COLORKEY' : undeclared id
entifier
Contrib\AdvSplash\advsplash.c(244) : error C2065: 'WS_EX_LAYERED' : undeclared i
dentifier
Contrib\AdvSplash\advsplash.c(270) : error C2065: 'DWORD_PTR' : undeclared ident
ifier
Contrib\AdvSplash\advsplash.c(270) : error C2146: syntax error : missing ')' bef
ore identifier 'myWnd'
Contrib\AdvSplash\advsplash.c(270) : error C2144: syntax error : '<Unknown>' sho
uld be preceded by '<Unknown>'
Contrib\AdvSplash\advsplash.c(270) : error C2144: syntax error : '<Unknown>' sho
uld be preceded by '<Unknown>'
Contrib\AdvSplash\advsplash.c(270) : error C2143: syntax error : missing ')' bef
ore 'identifier'
Contrib\AdvSplash\advsplash.c(270) : error C2198: 'timeSetEvent' : too few argum
ents for call through pointer-to-function
Contrib\AdvSplash\advsplash.c(270) : error C2059: syntax error : ')'
scons: *** [build\release\AdvSplash\advsplash.obj] Error 2
scons: building terminated because of errors.
kichik
9th October 2005 16:32 UTC
I actually wanted the config.log for the non-working build. The working one doesn't show the errors. But if it finds the libraries now, it's not important. The libraries were probably not found because the result was still cached from the last time you built it without the correct environment variables.
But the incorrect header file is a puzzle. It doesn't stop on HINSTANCE, but it does on newer definitions which require _WIN32_WINNT. But _WIN32_WINNT is defined on the same file. This means it takes the header files from another place. Do you have WinUser.h installed in another place than %MSSDK%\Include\WinUser.h?
BTW, you don't need to change INCLUDE and LIB on yourself. SCons handles that on its own and ignores your settings.
Instructor
9th October 2005 16:51 UTC
You are right there was "%VCToolkitInstallDir%\Include\WinUser.h". After clean VCToolkit install, all compiles fine. Thanks!
kichik
9th October 2005 20:59 UTC
Any idea how it got there? Was it there in the default installation of the VC Toolkit?
Instructor
10th October 2005 07:04 UTC
It is I place liberaries and headers from VC6 to VC Toolkit :)
kichik
10th October 2005 12:46 UTC
Ah, that explains it. I've updated the tool definition to give priority to the header and library files in the Platfrom SDK. In case they exist in both, the PSDK's should always be newer anyway.