[Scons-users] Building release mode binaries/libs for windows are "invalid"
delbert dev
delbertum at gmail.com
Mon Feb 3 13:46:04 EST 2014
In a scons script I am building gtest/gmock binaries/libs on windows 7 with:
env.Append(CPPPATH = gTestIncludes)
buildGtest = env.Library('c:\tmp\libgtest',
'c:\apps\gtest-1.0.7\src\gtest-all.cc')
Default(env.Alias('gtest', buildGtest))
... Same approach for gmock
When I run 'scons gtest' the libs are build:
cl /Foapps\gtest-1.7.0\src\gtest-all.obj /c apps\gtest-1.7.0\src\gtest-all.cc
/TP /nologo /bigobj /EHsc /D"WIN32" /c /MT /O2 /
MP /W3 /WX /D"VC_EXTRALEAN" /D"WIN32_LEAN_AND_MEAN" /Iapps\gtest-1.7.0 /I
apps\gtest-1.7.0\include /Iapps\gmo
ck-1.7.0 /Iapps\gmock-1.7.0\include
gtest-all.cc
...
lib /nologo /OUT:c:\tmp\libgmock.lib c:\apps\gmock-1.7.0\src\gmock-all.obj
lib /nologo /OUT:c:\tmp\libgtest.lib c:\apps\gtest-1.7.0\src\gtest-all.obj
When I use the above binaries in Debug mode in my application it works
(Using a MS Visual Studio Project). But If I build the binaries for Release
mode and build in VS I get:
fatal error C1010: unexpected end of file while looking for precompiled
header. Did you forget to add '#include "StdAfx.h"' to your source?
If I build the gtest libs from inside Visual Studio (using the gtest.snl
file/project) it works. Here is the commandline from VS for release mode:
/Zi /nologo /W3 /WX- /O2 /Oy- /D "WIN32" /D "NDEBUG" /D "_LIB" /D "_MBCS"
/Gm- /EHsc /MT /GS /fp:precise /Zc:wchar_t /Zc:forScope
/Fp"gtest/Release\gtest\gtest.pch" /Fa"gtest/Release\gtest\"
/Fo"gtest/Release\gtest\" /Fd"gtest/Release\gtest\vc100.pdb" /Gd /analyze-
/errorReport:queue
Why does the release mode binaries build with SCons not work when the ones
build with VS works?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20140203/61730443/attachment.htm
More information about the Scons-users
mailing list