[solved] fpc.cfg with switch -Xd lazarus / 1-Linux ---------------------------------------------------------------------- Ocye · 2009-11-20 12:09 For cross compilation I have to avoid reading from /usr/lib. It works well with "-Xd /usr/lib" at lazarus->compiler settings->additional (or however the english translation is). If I place the switch into fpc.cfg like Code: [Select]#ifdef x86_64 -Fl/usr/lib #else -Xd/usr/lib -Fl/usr/lib32 #endifit fails with "Error: Illegal parameter: -Xd/usr/lib". Any idea how to solve? Linux (Ubuntu 9.04) Lazarus 0.9.29 (r22308M) FPC 2.5.1 (Rev 14211) ---------------------------------------------------------------------- Jonas Maebe · 2009-11-20 20:25 Quote from: Ocye on November 20, 2009, 01:09:38 pmFor cross compilation I have to avoid reading from /usr/lib. It works well with "-Xd /usr/lib" at lazarus->compiler settings->additional (or however the english translation is). If I place the switch into fpc.cfg like Code: [Select]#ifdef x86_64 -Fl/usr/lib #else -Xd/usr/lib -Fl/usr/lib32 #endifit fails with "Error: Illegal parameter: -Xd/usr/lib". Any idea how to solve? I don't know why it works in the Lazarus compiler settings, but the reason that it fails on the command line is that -Xd doesn't take any additional parameters. "-Xd" by itself means "Do not use standard library search path". You don't have to and cannot specify the directories that it should not search. The standard library search paths are hardcoded in FPC, and -Xd simply tells the compiler not to search these directories. ---------------------------------------------------------------------- Ocye · 2009-11-21 16:31 That was the reason! Thanks a lot. Within the compiler settings I had to apply a blank, and apparently the remaining string was ignored there and not in the cfg.