[Scons-users] About initialize array in C++

Gary Oberbrunner garyo at oberbrunner.com
Fri Nov 21 09:58:29 EST 2014


Probably you just need to set a specific CXXFLAGS flag.  See what
command line cmake uses, and what scons uses; there will be some
different flags.  Add those to CXXFLAGS and it should work.

On Fri, Nov 21, 2014 at 9:32 AM, Feng  Chao <fengc at student.ethz.ch> wrote:
> Dear All,
>
> I am a fresh Scons user. I want to initialize in C++ an array with default
> values, say all 0. I simply do
> "int array[100] = {}",
> but using scons I will get error message "variable length array 'array' is
> used". I also tried cmake and it can compile successfully. Could anyone give
> me some suggestions?
>
> Thank you!
>
> Best,
> Chao
>
> ________________________________
> Chao Feng (冯超)
>
> Master student in Computational Biology & Bioinformatics
> ETH Zürich, Zuerich
> Switzerland
>
> Iber Group, Department of Biosystems Science and Engineering,
> ETH Zürich, Basel
> Switzerland
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>



-- 
Gary


More information about the Scons-users mailing list