Sign in Join

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

Mailing lists / fpc-devel / 2008-06

Free Pascal queries

4 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

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

Chris Handley

Hi,

I have been using fpc since the beginning of the year, and it is great. Thank you very much for a great product.

I have a few problems/queries.

1) Much of what I do is involved with preparing formatted reports. These mostly use RTF and that side is working well. However, one has to be produced in postscript and that is where I run into problems. How do I persuade fpc to talk to the Fonts.p file in MetroWorks CodeWarrior (or alternatively how do I access routines such as TextSize and StringWidth)?

2) If I have all my units in a folder, how do I tell fpc to go look in that folder when I am compiling a main program in a different folder?

Thanks for any help you can give me.

=
=
=
=
======================================================================== Dr Chris Handley
Dept of Computer Science Ph (+64) 3-479-8499
University of Otago Fax (+64) 3-479-8529
PO Box 56, Dunedin, 9054
New Zealand
____________________________________________________________________________ No drug, not even alcohol, causes the fundamental ills of society. If we're
looking for the source of our troubles, we shouldn't test people for drugs,
we should test them for stupidity, ignorance, greed and love of power. -P.J. O'Rourke, writer (1947- )

Reply by email

Luca Olivetti
to Chris Handley

En/na Chris Handley ha escrit:

2) If I have all my units in a folder, how do I tell fpc to go look in that folder when I am compiling a main program in a different folder?

use the parameter

-Fu/path/to/the/different/folder

You can also put it in /etc/fpc.cfg

Bye

Luca

Reply by email

Tomas Hajny
to Chris Handley: I have been using fpc since the beginning of the year, and it is great. Thank you very…

On Tue, June 10, 2008 01:27, Chris Handley wrote:

Hi Chris,

I have been using fpc since the beginning of the year, and it is great. Thank you very much for a great product. I have a few problems/queries.

First of all, please note that user questions (at least your second question below certainly falls into this category) should be primarily posted in fpc-pascal list.

Show quoted text 6 lines
1) Much of what I do is involved with preparing formatted reports. These mostly use RTF and that side is working well. However, one has to be produced in postscript and that is where I run into problems. How do I persuade fpc to talk to the Fonts.p file in MetroWorks CodeWarrior (or alternatively how do I access routines such as TextSize and StringWidth)?

I have no access to MetroWorks CodeWarrior and Fonts.p, but I guess that the macpascal dialect (-Mmacpas on command line) may possibly help with compilation of that file. However, you may need to perform some adaptations of that unit even if it doesn't have dependencies on other stuff (in which case it gets even more complicated).

2) If I have all my units in a folder, how do I tell fpc to go look in that folder when I am compiling a main program in a different folder?

Are you talking about the -Fu command line option, or do I miss something? Have you tried looking at our nice documentation (directly searchable on the WWW site) or at least the command line help?

Tomas

Reply by email

Jonas Maebe
to Chris Handley: I have been using fpc since the beginning of the year, and it is great. Thank you very…
Chris Handley wrote 6 lines
1) Much of what I do is involved with preparing formatted reports. These mostly use RTF and that side is working well. However, one has to be produced in postscript and that is where I run into problems. How do I persuade fpc to talk to the Fonts.p file in MetroWorks CodeWarrior (or alternatively how do I access routines such as TextSize and StringWidth)?

FPC includes a version of the Common Pascal interfaces, which also includes the Fonts unit. In general, it's however easier to add the FPCMacOSAll unit to your uses clause (as of FPC 2.2.2: MacOSAll), then you get all available interfaces at once instead of having to fiddle with different units to make sure you have all needed types available (because FPC doesn't support uses-propagation).

Jonas

Reply by email