This generates the following error:
AttributeError: 'cxx_taskgen' object has no attribute 'add_objfile'
On Friday, April 6, 2012 1:00:22 PM UTC-5, mdcb wrote:
>
> in fact:
>
> obj.add_objfile('bar.o')
> obj.add_objfile('bar2.o')
>
>
> On 4/6/12 10:46 AM, mdcb808 wrote:
>
>
> obj.add_obj_file = ['bar.o','bar2.o']
>
> + get rid of obj.libpath and obj.lib
>
>
>
>
> On 4/6/12 10:29 AM, SteveCronin wrote:
>
> I need to reference 2 .o files during the build phase - how do I do that?
>
> Below is my current script which works for 1 .o file.
>
> When I make obj.lib = 'bar.o', 'bar2.o' I get the following errors:
> Traceback (most recent call last):
> File "/usr/bin/node-waf", line 16, in <module>
> Scripting.prepare(t, os.getcwd(), VERSION, wafdir)
> File "/usr/bin/../lib/node/wafadmin/Scripting.py", line 145, in prepare
> prepare_impl(t, cwd, ver, wafdir)
> File "/usr/bin/../lib/node/wafadmin/Scripting.py", line 135, in
> prepare_impl
> main()
> File "/usr/bin/../lib/node/wafadmin/Scripting.py", line 188, in main
> fun(ctx)
> File "/usr/bin/../lib/node/wafadmin/Scripting.py", line 386, in build
> return build_impl(bld)
> File "/usr/bin/../lib/node/wafadmin/Scripting.py", line 405, in
> build_impl
> bld.compile()
> File "/usr/bin/../lib/node/wafadmin/Build.py", line 255, in compile
> self.flush()
> File "/usr/bin/../lib/node/wafadmin/Build.py", line 717, in flush
> tg.post()
> File "/usr/bin/../lib/node/wafadmin/TaskGen.py", line 219, in post
> self.apply()
> File "/usr/bin/../lib/node/wafadmin/TaskGen.py", line 206, in apply
> v()
> File "/usr/bin/../lib/node/wafadmin/Tools/ccroot.py", line 482, in
> apply_obj_vars
> app('LINKFLAGS', [lib_st % i for i in v['LIB']])
> TypeError: not all arguments converted during string formatting
>
>
> ____WSCRIPT FILE___________
> srcdir = '.'
> blddir = 'build'
> VERSION = '1.0.0'
> APPNAME = 'node-xyz'
>
> def set_options(opt):
> opt.tool_options('compiler_cxx')
>
> def configure(conf):
> conf.check_tool('compiler_cxx')
> conf.check_tool('node_addon')
>
> def build(bld):
> obj = bld.new_task_gen('cxx', 'shlib', 'node_addon')
> obj.source = 'node-XYZ.cc', 'foo.cc', 'foo2.cc', 'foo3.cc',
> 'foo4.cc', 'foo5.cc', 'foo6.cc'
> obj.libpath = [ bld.path.abspath() ]
> obj.lib = 'bar.o'
> bld.env.append_value('LINKFLAGS', '-m64', '-lcrypto -lssl -lz'.split())
> obj.cxxflags = ['-g', '-m64', '-D_FILE_OFFSET_BITS=64',
> '-D_LARGEFILE_SOURCE']
> obj.target = 'node-xyz'
>
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>
>
>
>
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en