tags:

views:

115

answers:

1

Hi I'm building environment with Scons. For Windows platform (link) linker gets Scons setup of my share library path with prefix - disk name

I've library on NFS:

libs='\\\\share\\lib\\lib'

In scons I have:

env.Append(LIBPATH = [libs])

result is that the linker invokes something like this:

/LIBPATH:D:\share\lib\lib

+1  A: 

It looks like the Append function is changing your input. Have you tried manipulating 'LIBPATH' through the __set_item__ interface? Try:

env['LIBPATH'] += ':'+libs

or

env['LIBPATH'] += ':\\\\share\\lib\\lib'

Also, if you want to get out of python \escape-hell, you can use the string prefix r which stands for "raw" and all your \'s will be passed through unmolested.

env['LIBPATH'] += r':\\share\lib\lib'

EDIT: In response to the author's comment and in order to debug this further try:

append_lib_path = r':\\share\lib\lib'
print 'DEBUG: append_lib_path is', append_lib_path

print "DEBUG: before appending to env['LIBPATH'], env['LIBPATH'] is ",env['LIBPATH']

env['LIBPATH'] += append_lib_path

print "DEBUG: after appending to env['LIBPATH'], env['LIBPATH'] is ",env['LIBPATH']

If you see the correct value in env['LIBPATH'] on the last print, then something else in scons is mangling your input. If the string you want to append to the lib path is incorrect, try manipulating the string in the python interpreter. Do <Windows start> -> <Run ...>. Then type 'python'. This should give you an interactive python terminal and you can experiment with string manipulation. If doing that sequence of commands doesn't work, you can try to find your python install someplace and double-click the python.exe file.

Ross Rogers
Hi Ross, additional ':' produces:"/I:\share\lib\lib", when I add additional space instead i've"/I \share\lib\lib", which is still not correct. I should have"/I \\share\lib\lib" this one additional backslash is significant and I can't get it. No matter how much "\\\\\" (or r'') I put before "share".
bua
see above edits
Ross Rogers
The values seems to be correct, but after adding them to env['LIBPATH'] the Disk name is still added.Only one valid solution which i've found for that is to: -- net use share L: - on winXP -- smbmount .... - on linuxIn the batch which invokes scons.This same happened for some other properties, but I don't remember now, for which one.Anyway thanks for help Ross.
bua