Archive: Problem compiling with mstoolkit.py v1.3


Problem compiling with mstoolkit.py v1.3
Hello,

i'm having problem to compile NSIS with the latest version of MSTOOLKIT.py (1.3), it works perfectly with the previous version... here is the log


D:\Scripts NSIS\NSIS-20051011>scons -j4 MSTOOLKIT=YES
scons: Reading SConscript files ...
Delete("nsis-12-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 ...
"C:\Progra~1\Installers\MS-Platform-SDK\\bin\Win64\link.exe" /nologo /opt:nowin9
8 /map /entry:DllMain /NODEFAULTLIB /dll /out:build\release\InstallOptions\Insta
llOptions.dll kernel32.lib user32.lib gdi32.lib shell32.lib comdlg32.lib build\r
elease\InstallOptions\InstallerOptions.obj build\release\InstallOptions\ioptdll.
res
"C:\Progra~1\Installers\MS-Platform-SDK\\bin\Win64\link.exe" /nologo /opt:nowin9
8 /map /OUT:build\release\Library\LibraryLocal\LibraryLocal.exe kernel32.lib ole
aut32.lib version.lib build\release\Library\LibraryLocal\LibraryLocal.obj
LibraryLocal.obj : error LNK2019: unresolved external symbol "__int64 std::_Fpz"
(?_Fpz@std@@3_JA) referenced in function "protected: virtual class std::fpos<in
t> __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::seekoff
(long,int,int)" (?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?
$fpos@H@2@JHH@Z)
LibraryLocal.obj : error LNK2019: unresolved external symbol "long const std::_B
ADOFF" (?_BADOFF@std@@3JB) referenced in function "protected: virtual class std:
:fpos<int> __thiscall std::basic_streambuf<char,struct std::char_traits<char> >:
:seekoff(long,int,int)" (?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@
@MAE?AV?$fpos@H@2@JHH@Z)
LibraryLocal.obj : error LNK2019: unresolved external symbol "public: void __thi
scall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ) re
ferenced in function "public: int __thiscall std::basic_string<char,struct std::
char_traits<char>,class std::allocator<char> >::compare(unsigned int,unsigned in
t,char const *,unsigned int)const " (?compare@?$basic_string@DU Creating libra
ry build\release\Insta?$char_traits@D@stllOptions\InstallOd@@V?$allocator@D@ptio
ns.lib and obj2@@std@@QBEHIIPBDIect build\release\@Z)
LibraryLocal.oInstallOptions\Insbj : error LNK2019tallOptions.exp
: unresolved external symbol "public: void __thiscall std::locale::facet::_Regis
ter(void)" (?_Register@facet@locale@std@@QAEXXZ) referenced in function "class s
td::ctype<char> const & __cdecl std::use_facet<class std::ctype<char> >(class st
d::locale const &)" (??$use_facet@V?$ctype@D@std@@@std@@YAABV?$ctype@D@0@ABVloca
le@0@@Z)
LibraryLocal.obj : error LNK2019: unresolved external symbol "public: class std:
:locale::facet const * __thiscall std::locale::_Getfacet(unsigned int)const " (?
_Getfacet@locale@std@@QBEPBVfacet@12@I@Z) referenced in function "class std::cty
pe<char> const & __cdecl std::use_facet<class std::ctype<char> >(class std::loca
le const &)" (??$use_facet@V?$ctype@D@std@@@std@@YAABV?$ctype@D@0@ABVlocale@0@@Z
)
LibraryLocal.obj : error LNK2019: unresolved external symbol "public: void __thi
scall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ) re
ferenced in function "protected: bool __thiscall std::basic_string<char,struct s
td::char_traits<char>,class std::allocator<char> >::_Grow(unsigned int,bool)" (?
_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAE_NI_N@Z)
LibraryLocal.obj : error LNK2019: unresolved external symbol "public: void __thi
scall std::ios_base::_Addstd(void)" (?_Addstd@ios_base@std@@QAEXXZ) referenced i
n function "protected: void __thiscall std::basic_ios<char,struct std::char_trai
ts<char> >::init(class std::basic_streambuf<char,struct std::char_traits<char> >
*,bool)" (?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IAEXPAV?$basic_streamb
uf@DU?$char_traits@D@std@@@2@_N@Z)
LibraryLocal.obj : error LNK2019: unresolved external symbol "struct _iobuf * __
cdecl std::_Fiopen(char const *,int,int)" (?_Fiopen@std@@YAPAU_iobuf@@PBDHH@Z) r
eferenced in function "public: class std::basic_filebuf<char,struct std::char_tr
aits<char> > * __thiscall std::basic_filebuf<char,struct std::char_traits<char>
>::open(char const *,int,int)" (?open@?$basic_filebuf@DU?$char_traits@D@std@@@st
d@@QAEPAV12@PBDHH@Z)
build\release\Library\LibraryLocal\LibraryLocal.exe : fatal error LNK1120: 8 unr
esolved externals
cl /nologo /O2 /GX /W3 /TP /D_WIN32_IE=0x0500 /DNSIS_MAX_STRLEN=1024 /DNSIS_MAX_
INST_TYPES=32 /DNSIS_DEFAULT_LANG=1033 /DNSIS_CONFIG_UNINSTALL_SUPPORT /DNSIS_CO
NFIG_LICENSEPAGE /DNSIS_CONFIG_COMPONENTPAGE /DNSIS_CONFIG_SILENT_SUPPORT /DNSIS
_CONFIG_VISIBLE_SUPPORT /DNSIS_CONFIG_ENHANCEDUI_SUPPORT /DNSIS_CONFIG_COMPRESSI
ON_SUPPORT /DNSIS_COMPRESS_BZIP2_LEVEL=9 /DNSIS_CONFIG_CRC_SUPPORT /DNSIS_SUPPOR
T_BGBG /DNSIS_SUPPORT_CODECALLBACKS /DNSIS_SUPPORT_MOVEONREBOOT /DNSIS_SUPPORT_A
CTIVEXREG /DNSIS_SUPPORT_INTOPTS /DNSIS_SUPPORT_STROPTS /DNSIS_SUPPORT_STACK /DN
SIS_SUPPORT_FILEFUNCTIONS /DNSIS_SUPPORT_FINDFIRST /DNSIS_SUPPORT_CREATESHORTCUT
/DNSIS_SUPPORT_INIFILES /DNSIS_SUPPORT_REGISTRYFUNCTIONS /DNSIS_SUPPORT_COPYFIL
ES /DNSIS_SUPPORT_REBOOT /DNSIS_SUPPORT_FNUTIL /DNSIS_SUPPORT_EXECUTE /DNSIS_SUP
PORT_SHELLEXECUTE /DNSIS_SUPPORT_GETDLLVERSION /DNSIS_SUPPORT_GETFILETIME /DNSIS
_SUPPORT_HWNDS /DNSIS_SUPPORT_ENVIRONMENT /DNSIS_SUPPORT_RMDIR /DNSIS_SUPPORT_FI
LE /DNSIS_SUPPORT_DELETE /DNSIS_SUPPORT_RENAME /DNSIS_SUPPORT_MESSAGEBOX /DNSIS_
SUPPORT_VERSION_INFO /DNSIS_SUPPORT_STANDARD_PREDEFINES /DNSIS_LOCKWINDOW_SUPPOR
T /DNSIS_CONFIG_PLUGIN_SUPPORT /DNSIS_VERSION=v12-Oct-2005.cvs /c Source\build.c
pp /Fobuild\release\makensis\build.obj
scons: *** [build\release\Library\LibraryLocal\LibraryLocal.exe] Error 1120
build.cpp
scons: building terminated because of errors.
Can someone please help me to find where the problem is?
Thanks in advance

It compiles just fine for me, and all that changed in 1.3 is the order of the lib and include directories. Are you sure nothing else has changed? Have you tried cleaning up LibraryLocal before trying to build it again? Try:

scons MSTOOLKIT=yes -c LibraryLocal

I tried what you wrote, but i still get the same error...
and i did'nt change anything, qith 1.2 it works but not with 1.3.
Any idea?


Do you have files named iostream, istream, ostream, fstream, streambuf, ios or iosfwd in %MSSDK%\Include?


No, there is none of these files in that folder...
Are they required to compile correctly? And where can i get them?


No, they shouldn't be there. They should be in VC Toolkit include directory. Their presence could have explained this error.

Are you using cygwin or something similar to build NSIS?


No i'm using the ms platform sdk and the vc++ toolkit 2003 they are installed in :
C:\Program Files\Installers\MS-Platform-SDK
C:\Program Files\Installers\MS-VisualC++Toolkit2003
Python is installed in
C:\Program Files\Installers\python24
and scons is also in the python dir.


But are you running it from a cygwin or msys shell? That could explain the problem, because os.sep would be a colon and not semi-colon. Try this one.


But are you running it from a cygwin or msys shell?
I d'ont know what does it mean, but i tried your file and it didn't work...

Can you attach the directory listings of %MSSDK%\lib, %MSSDK%\include, %VCToolkitInstallDir%\lib and %VCToolkitInstallDir%\include?


Here is the list


It's libcp.lib. The same thing happened in this thread. I wonder if it's just a one time bug with one of the Platform SDK versions, or if this file is always included in new versions. Do you mind uninstalling the current PSDK you have, installing the latest one and letting me know if that file is still there? Can you also attach this file? Even though it shouldn't be there, it should still contain all of those objects that weren't found in it.


I have the same problem, it exists in the latest Platform SDK.


ok i'll try with a new PSDK...
the file is too big to be attached (even if I 7zip it...)
Thanks for your help, i'll let you know if with the new PSDK it works.


Ok I've tested with the latest PSDK a i still get the error, the only way to correct it is to rename libcp.lib...


I also have "%MSSDK%\Lib\LIBCP.LIB", but there is no problem with compiling NSIS (Windows Server 2003 SP1 SDK)


That's strange, for me the only way to make it work is to rename the file... I Also use the Windows Server 2003 SP1 SDK...


WebMatze, can you attach the list of the include folder of the Platform SDK as well?

Instructor, are you using the latest CVS version? The fix that I've added for your problem is currently available only there.


I've added a workaround that searches for a good version of libcp.lib and uses it. The file 'ms' goes into SCons\Config.


And a little fix.


Hello,

you fix doesn't seem to work

D:\Scripts NSIS\NSIS-20051012>scons -j4 MSTOOLKIT=YES CHMDOCS=YES VERSION=2.10 dist-installer
scons: Reading SConscript files ...
Delete("nsis-2.10")
Delete(".instdist")
Delete(".test")
Using Microsoft tools configuration
ValueError: list.remove(x): x not in list:
File "SConstruct", line 189:
envs = SConscript('SCons/Config/ms')
File "C:\Program Files\Installers\Python24\scons-0.96.91\SCons\Script\SConscri
pt.py", line 557:
return apply(method, args, kw)
File "C:\Program Files\Installers\Python24\scons-0.96.91\SCons\Script\SConscri
pt.py", line 494:
return apply(_SConscript, [self.fs,] + files, {'exports' : exports})
File "C:\Program Files\Installers\Python24\scons-0.96.91\SCons\Script\SConscri
pt.py", line 226:
exec _file_ in call_stack[-1].globals
File "SCons\Config\ms", line 47:
libdirs.remove(Dir('#/.sconf_temp').abspath);
D:\Scripts NSIS\NSIS-20051012>
Here is the error.

Thanks, fixed. Remove the libdirs.remove line, it's no longer needed.


Here is the list of the include dir


Thanks, that confirms libcp.lib should not be included in the Platform SDK. They must have put it there by mistake. There are no matching haeder files for it.


YES!!!
It works

thanks a lot kichik