• 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 - How?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FreePascal unit in Cocoa project - How?


  • Subject: Re: FreePascal unit in Cocoa project - How?
  • From: "Alexander Bokovikov" <email@hidden>
  • Date: Wed, 25 Feb 2009 21:16:05 +0500

On 25 Feb 2009, at 10:56, Jonas Maebe wrote:

That is perfectly possible.

Glad to hear that!!

There is no specific FPC/Cocoa template, but I think this should work:

I'm sorry, but I can't make it to work. Perhaps it's because I'm not so advanced in XCode, as I'm just learning it. Though I've renamed "main" procedure, as you adviced, but a build error appars, indicating that "_main" is still defined somewhere. Also I see a warning, indicating that XCode has no idea on what to do with Pascal files. At least it's my understanding of what I see.


Here is the screenshot of build result and the XCode project:

http://home.bokovikov.com/etc/mac/pasincocoa/error1.png

And here is my XCode project zipped:

http://home.bokovikov.com/etc/mac/pasincocoa/cocoapasproj.zip

None of extra PAS units have been added yet. First of all I'd like to get a working "dummy" project.

Could you help me to understand what is happening?

Thanks in advance.


a) start from the "FPC-C-C++ Carbon Application" template shipped with
FPC
b) add a new target to the project, and pick Application->Cocoa as the
template type
c) add your Objective-C sources and nibs/xibs to the project and to
this Cocoa target (similarly, if you add additional Pascal sources add
them only to the target with the same name as your project, and
additional C/C++ sources only to the target with the name "External")
d) rename the "main" function in your Cocoa sources to "CocoaMain"
e) remove the "MainUnit.pas" unit from the project and replace the
contents of the Start.pas file with the following:

_______________________________________________ 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
  • Follow-Ups:
    • Re: FreePascal unit in Cocoa project - How?
      • From: Jonas Maebe <email@hidden>
  • Prev by Date: need help on understanding the crashreporter traces
  • Next by Date: Override configuration-specific settings in target templates
  • Previous by thread: Re: FreePascal unit in Cocoa project - How?
  • Next by thread: Re: FreePascal unit in Cocoa project - How?
  • Index(es):
    • Date
    • Thread