[Bf-committers] MSVC 7.1 compilation : lot of errors since the 15th of April

Mathias Wein lynx at aspect-design.de
Thu Apr 19 14:07:00 CEST 2007

Stephen Swaney wrote:
> By default, scons adds CCFLAGS to CXXFLAGS when it does
> C++ code.  The result was inappropriate or duplicate
> compile options.  To correct this, we separated
> If you are using  win32-vc-config.py for your config file,
> you might try applying the following patch.
> Index: win32-vc-config.py
> ===================================================================
> RCS file: /cvsroot/bf-blender/blender/config/win32-vc-config.py,v
> retrieving revision 1.25
> diff -u -r1.25 win32-vc-config.py
> --- win32-vc-config.py	28 Feb 2007 04:51:13 -0000	1.25
> +++ win32-vc-config.py	16 Apr 2007 14:36:39 -0000
> @@ -144,6 +144,7 @@
>  CXX = 'cl.exe'
>  CCFLAGS = ['/nologo', '/Og', '/Ot', '/Ob1', '/Op', '/G6','/EHsc', '/J', '/W3', '/Gd', '/MT']
> +CXXFLAGS = ['/nologo', '/Og', '/Ot', '/Ob1', '/Op', '/G6','/EHsc', '/J', '/W3', '/Gd', '/MT']
>  BF_DEBUG_FLAGS = ['/Zi', '/FR${TARGET.base}.sbr']

Since you *replace* CXXFLAGS in the environment, i think setting it before
has absolutely no effect, the result (for me at least) is that C++ files 
are compiled
without any kind of useful flags set, which with MSVC means it will not 
at all, and on linux it will build without options like 
-fno-strict-aliasing, giving extra
warnings and possibly non-working code (you tell me if that's dangerous, 
i don't know).

Whatever you wanted to do, i'm afraid it does not work this way...
If you want different flags for C and C++ use CFLAGS and CXXFLAGS rather
than CCFLAGS, since that's meant to be common options for C and C++.
At least that's how i interpret the scons manual.


More information about the Bf-committers mailing list