Sign in Join

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

Mailing lists / fpc-pascal / 2014-04

how to use macros on linux?

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

waldo kitty

when i try to compile a program on my non-GUI linux, it tells me that it can't find the programs... hunh?

fpc -FUlib/$(TargetCPU)-$(TargetOS) foo.pas

fpc is trunk installed via fpcup...

[quote]
~/fpc -FUlib/$(TargetCPU)-$(TargetOS)
foo.pas
TargetCPU: command not found
TargetOS: command not found
Free Pascal Compiler version 2.6.5 [2014/04/08] for i386 Copyright (c) 1993-2012 by Florian Klaempfl and others Target OS: Linux for i386
Compiling foo.pas
foo.pas(23,1) Error: Can't create object file: lib/-/project1.o foo.pas(23,1) Fatal: Can't create object lib/-/project1.o Fatal: Compilation aborted
Error: /home/user/development/fpc/bin/i386-linux/ppc386 returned an error exitcode (normal if you did not specify a source file to be compiled)

[/quote]

so how do i use macros to tell fpc where to place the unit libraries on linux like i do for winwhatever??

NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted.

Reply by email

Mattias Gaertner
to waldo kitty
Show quoted text 6 lines
when i try to compile a program on my non-GUI linux, it tells me that it can't find the programs... hunh? fpc -FUlib/$(TargetCPU)-$(TargetOS) foo.pas

These are Lazarus macros.

so how do i use macros to tell fpc where to place the unit libraries on linux like i do for winwhatever??

fpc macro example:
fpc -FUlib/\$fpctarget foo.pas

Mattias

Reply by email

Sven Barth
to Mattias Gaertner
Mattias Gaertner wrote 5 lines
> so how do i use macros to tell fpc where to place the unit libraries on linux > like i do for winwhatever?? fpc macro example: fpc -FUlib/\$fpctarget foo.pas

And just for explanation: the "\$" is needed so that the shell does not treat the $fpctarget as a shell variable.

Regards,
Sven

Reply by email

waldo kitty
to Mattias Gaertner: On Mon, 14 Apr 2014 12:29:00 -0400 These are Lazarus macros. fpc macro example: fpc…
Mattias Gaertner wrote 11 lines
On Mon, 14 Apr 2014 12:29:00 -0400 waldo kitty wrote: > > when i try to compile a program on my non-GUI linux, it tells me that it can't > find the programs... hunh? > > > fpc -FUlib/$(TargetCPU)-$(TargetOS) foo.pas These are Lazarus macros.

oh! hummm...

Show quoted text 5 lines
> so how do i use macros to tell fpc where to place the unit libraries on linux > like i do for winwhatever?? fpc macro example: fpc -FUlib/\$fpctarget foo.pas

i believe i tried that... i'll give it another go, though...

and yes, i do note the \$ escape to prevent the shell from attempting to frak it up for me :lol: i did try that on the above, too, and also escaping the parens but came here out of frustration when nothing i was doing was working properly...

[time passes]

yes! thanks! :)

this also tells me what i need to do for a couple of other projects O:)

NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted.

Reply by email