littlorryatchina / gyp

Automatically exported from code.google.com/p/gyp
0 stars 0 forks source link

Leading -l in libraries is not stripped by Xcode generator, treated like a path #285

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. In a link_settings dictionary, add a libraries section with at least one 
library specified as "-lsomelib"
2. Set up search paths (using msvs_settings and xcode_settings since 
library_dirs does not actually exist) so that the libsomelib.{a|dylib} is in 
your library search paths
3. Generate Xcode project files and try to build.

What is the expected output? What do you see instead?

The leading "-l" should be stripped from the library name, and the library 
should be found and linked.

Instead, Xcode complains "No such file or directory: [project 
dir]/-llibmylib.dylib"

This runs contrary to the documentation, which states:

However, any string value beginning with any of these characters is excluded 
from pathname relativization:
- to support specifying such items as -llib, meaning “library lib in the 
library search path.”

This example works as it should with the MSVS generator.

What version of the product are you using? On what operating system?

Latest version of gyp from SVN checkout on Mac OS X 10.7, Xcode 4.3.2.

Original issue reported on code.google.com by phoe...@google.com on 17 Jul 2012 at 3:16