Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2009-12

Is $fpctarget defined on all targets?

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Aleksa Todorovic

Hi!

I've just started porting an application from Java to FPC (current targets are Win32 and Linux). I can successfully compile and run initial tests on both targets. The problem I have is with -FU parameter. When I execute

fpc -FUunits/$fpctarget test_client

on Windows, it correctly outputs .o, .ppu, .a and other generated files to units/i386-win32 (btw, I need to create directory i386-win32 manually). But, when I execute same command on Linux, it outputs to directory units even when I create units/i386-linux.

Windows is XP, Linux is CentOS 5, fpc is 2.4.0rc1 installed from rpm.

Is this bug with fpc, should I report it to bug tracker?

Best,
Aleksa

Jonas Maebe
to Aleksa Todorovic
Aleksa Todorovic wrote 10 lines
I've just started porting an application from Java to FPC (current targets are Win32 and Linux). I can successfully compile and run initial tests on both targets. The problem I have is with -FU parameter. When I execute fpc -FUunits/$fpctarget test_client on Windows, it correctly outputs .o, .ppu, .a and other generated files to units/i386-win32 (btw, I need to create directory i386-win32 manually).

On Unix platforms, $x is used in shells to denote the contents of shell variable x. If x is undefined, it's considered to be empty.

You therefore have to escape the $: fpc -FUunits/\$fpctarget test_client

Jonas

Aleksa Todorovic
to Jonas Maebe
Jonas Maebe wrote 17 lines
On 06 Dec 2009, at 17:01, Aleksa Todorovic wrote: > I've just started porting an application from Java to FPC (current > targets are Win32 and Linux). I can successfully compile and run > initial tests on both targets. The problem I have is with -FU > parameter. When I execute > > fpc -FUunits/$fpctarget test_client > > on Windows, it correctly outputs .o, .ppu, .a and other generated > files to units/i386-win32 (btw, I need to create directory i386-win32 > manually). On Unix platforms, $x is used in shells to denote the contents of shell variable x. If x is undefined, it's considered to be empty. You therefore have to escape the $: fpc -FUunits/\$fpctarget test_client

Ok, I understand. Thanks for your help!