• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: FreePascal unit in Cocoa project - debugger problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FreePascal unit in Cocoa project - debugger problems


  • Subject: Re: FreePascal unit in Cocoa project - debugger problems
  • From: Jonas Maebe <email@hidden>
  • Date: Wed, 8 Jul 2009 11:46:37 +0200


On 07 Jul 2009, at 18:52, Alexander Bokovikov wrote:

Now I have the only additional question - How to deal with nultiple FPC units? Should I explicitly include all used fpc units into my XCode project?

Yes.

Should I add them for both targets or only to fpc target?

You only have to add them to the "FPC Objective-C Cocoa" target. One important thing to keep in mind: make sure you do not add units to the target that are not actually used by your program, or you will get errors (because then the compiler will not generate an assembler file, and gcc will subsequently complain that it cannot find the assembler file for said unit).


Similarly, if you remove a unit from your program's uses clauses, also remove it from the target's list of units (you don't have to remove it from your project).

Another thing: that "FPC Objective-C Cocoa" target always has to have the same name as the Xcode project itself. So make sure you keep them in sync in case you would rename one or the other. Maybe this was the cause of the strange debugger behaviour you had earlier (Xcode was probably still using old object files).

How to set the search path in the project settings for multiple paths? Should I use semicolon, as in Delphi or whatever else?

Double-click on the project icon in the Xcode files overview, go to the "Build" tab, select "All Configurations" and show "User-Defined Settings". One of those settings is FPC_UNITS_PATH, which by default is set to only the project directory (the -FuX parameter means "add directory X to the units search path).


To add additional directories, the easiest is to simply add additional -Fu parameters, e.g., change that setting to

-Fu"$(PROJECT_DIR)" -Fu"/Path to/my other sources"

It is also possible to use multiple paths separated by a semicolon in a single -Fu parameter, and on Unix platforms (such as Mac OS X) you can also use a colon. If you use a semicolon, make sure it appears between quotes when working on the command line, as otherwise it will be interpreted by the shell.

Should I assign exect paths or may I assign only some "root" units subdirectory?


You can use wildcards in unit search paths. E.g.

-Fu"/Data/Developments/UnitsX/*"

will search all of the subdirectories of /Data/Developments/UnitsX for units. Note that this will not search /Data/Developments/UnitsX itself for units (add -Fu"/Data/Developments/UnitsX" if you want that). Make sure to always add quotes around all paths to avoid problems with spaces and other special characters in path names.


Jonas _______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Re: FreePascal unit in Cocoa project - debugger problems (From: "Alexander Bokovikov" <email@hidden>)

  • Prev by Date: Re: PB Newbie Again
  • Next by Date: iPhone: dynamically change program icon
  • Previous by thread: Re: FreePascal unit in Cocoa project - debugger problems
  • Next by thread: Re: FreePascal unit in Cocoa project - debugger problems
  • Index(es):
    • Date
    • Thread