Sign in Join

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

Mailing lists / fpc-pascal / 2008-09

command-line+Carbon template?

4 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

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

Unknown author

Hi,

I'm porting a rather larger CW app to FPC under MacOSX 10.4.11, and am trying to work around some rather flaky behavior I'm seeing with FPC's Turbo-based file i/o -- by dropping back to <sigh> the old MacOS FileManager routines.

Trouble is, the app I'm porting is a command-line utility, which I've been building using the FPC 2.2.0 Standard Tool template. I've included Files.pas and its dependencies in the uses clause, but I still need to link in a Carbon lib.

Assuming this is even possible :), is anyone aware of an FPC template that would produce such an "FPC Standard Tool++"?

Appreciate any thoughts on this issue, as I'm more or less flying blind at this point.

Bill D.

Felipe Monteiro de Carvalho
to Unknown author

I do not know what the word flaky means, but it would probably be better if you describe your problem with the standard pascal I/O in FPC so someone can help you. I have never had problems with it. And what is the turbo-based I/O? TStream?

Felipe Monteiro de Carvalho
Marco van de Voort
to Felipe Monteiro de Carvalho

In our previous episode, Felipe Monteiro de Carvalho said:

I do not know what the word flaky means, but it would probably be better if you describe your problem with the standard pascal I/O in FPC so someone can help you. I have never had problems with it. And what is the turbo-based I/O? TStream?

No, normal assign(file)/reset/rewrite/close(file) cycle. Typical mistake: not adding ,1 to the reset or rewrite for binary files. ("file" type)

Jonas Maebe
to Unknown author: I'm porting a rather larger CW app to FPC under MacOSX 10.4.11, and am trying to work…
Show quoted text 5 lines
Trouble is, the app I'm porting is a command-line utility, which I've been building using the FPC 2.2.0 Standard Tool template. I've included Files.pas and its dependencies in the uses clause, but I still need to link in a Carbon lib.

That works exactly the same as with using a C, Objective-C or C++ project in Xcode: just add Carbon.framework to your project (Project-

Add to Project... -> navigate to /System/Library/Frameworks ->

select Carbon.framework -> click "Add".

(note: *never* select frameworks from SDK's, but always in the regular system hierarchy; if you then tell Xcode to use a particular SDK, it will prepend all the regular system paths with the SDK paths).

Jonas