Rendering for Fun

Computer graphics, software development, web,
photography, and graphic design
Rendering for Fun by doyub 2009/09/28
Sony Pictures Imageworks Open Source by doyub 2009/08/23
SCons - Working with Windows by doyub 2009/08/13
SCons - Making Library by doyub 2009/07/30
SCons - Introduction by doyub (1) 2009/04/05
Keep it Simple, Stupid by doyub 2009/03/12


env Environment()
env.Program('test', 'test.cpp')
LINK : fatal error LNK1104: cannot open file 'kernel32.lib' scons: *** [main.exe] Error 1104 scons: building terminated because of errors.
import os
env = Environment()
env['ENV']['PATH'] = os.environ['PATH']
env['ENV']['INCLUDE'] = os.environ['INCLUDE']
env['ENV']['LIB'] = os.environ['LIB']
env['ENV']['LIBPATH'] = os.environ['LIBPATH']
env['ENV']['WindowsSdkDir'] = os.environ['WindowsSdkDir']
env['ENV']['VCINSTALLDIR'] = os.environ['VCINSTALLDIR']
env.Program('test', 'test.cpp')scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... link /nologo /OUT:main.exe main.obj scons: done building targets.
Library('mylib', 'foo.cpp')
Library('mylib', 'src/mylib/foo.cpp')
env = Environment(CPPPATH=['./include/mylib'], LIBPATH = ['./'])
env.Program('test', Glob('src/test/*.cpp'))
BUILD_DIR = 'build/' VariantDir(BUILD_DIR, '.', duplicate=0)
env.Program('test', Glob('src/test/*.cpp'))import os
...
env.Program('bin/test', source=map(lambda x: BUILD_DIR + x, glob.glob('src/test/*.cpp'))
env = Environment(CPPPATH=['./include/mylib'], LIBPATH = ['./'])
env = Environment(CPPPATH=['./include/mylib'], LIBPATH = ['./lib'])
./configure make all sudo make install
Program('main.cpp')
scons
scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... g++ -o main.o -c main.cpp g++ -o main main.o scons: done building targets.
scons -Q
scons -c
Program('test', ['foo.cpp', 'bar.cpp', 'main.cpp'])
Program('test', Glob('*.cpp'))
env = Environment(CPPPATH='/usr/local/include')
env.Program('test', 'main.cpp')
g++ -o main.o -c -I/usr/local/include main.cpp g++ -o test main.o
env = Environment(LIBPATH='/usr/local/lib', LIBS='freetype')
env.Program('test', 'main.cpp')
g++ -o main.o -c main.cpp g++ -o test main.o -L/usr/local/lib -lfreetype
Copyright ⓒ 2010 Doyub Kim. All rights reserved.
Powered by Textcube, Blueprint CSS Framework 0.8 and script.aculo.us 1.8.2
창민짱
2009/06/23 21:50 edit / delete reply
잘 봤습니다.^^