[fpc-pascal] FPC shared libraries for Mac OS X
jonas.maebe at elis.ugent.be
Wed Aug 20 22:50:07 CEST 2008
On 20 Aug 2008, at 08:22, Werner Bochtler wrote:
> This works fine for the commandline but if I try to add e.g.
> -k"-install_name libTest.1.dylib" to my local configuration file
> I get the following error message:
> ld: unknown option: -install_name libTest.1.dylib
> /usr/bin/libtool: internal link edit command failed
> Any ideas?
Anything you enter on the command line is first interpreted by the
shell. Using "..." has a special meaning in shells: it means "treat
everything between these two characters as a single string, but still
interpret any shell variables or other substitution commands in this
string". The result is that when fpc asks for the paramstr(x)
corresponding to this parameter, it will see
(as one parameter, with the space). Without the quotes, fpc would see
two parameters, the first one being -k-install_name and the second one
If you put parameters inside a configuration file, then those
parameters are not interpreted by any shell, but read straight away by
fpc. So if you put -k"-install_name libTest.1.dylib" in there, fpc
will actually read that exact string. As a result, it will not pass
this to the linker:
The result is that the linker will not get the two parameters it
expects (first a parameter called -install_name, followed by a
parameter with the name of the install name), but one single parameter
There is obviously no linker parameter with that name.
You may want to read some tutorials about unix shell scripting if
you're going to be working a lot on the command line.
More information about the fpc-pascal