• 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: Non-Apple compiler integration in Xcode 2.1
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Non-Apple compiler integration in Xcode 2.1


  • Subject: Re: Non-Apple compiler integration in Xcode 2.1
  • From: Scott Tooker <email@hidden>
  • Date: Wed, 15 Jun 2005 11:04:09 -0700

Please file bugs on specific issues that you find. In the future, we want to provide a way for developers to define their own tool specs, but we aren't there yet.

SCott

On Jun 14, 2005, at 9:51 PM, Michael Casteel wrote:

I am trying to get a Pascal compiler (Free Pascal 2.0) working under
Xcode 2.1. Many thanks to Dr. Rolf Jansen for releasing integration
logic for Xcode 1.5, but significant changes are needed to his work due
to differences between Xcode 1.5 and 2, it seems. Even then, a few
things remain to be worked around. Custom build step details are
included below.


The basic approach is to create a custom build step for Pascal sources,
one which runs the Free Pascal compiler and yields a .o output. The
Pascal interfaces from UI3.4 have been placed within reach of the
compiler, so Pascal files (units as well as programs) generally compile.


- Xcode won't pick up Free Pascal's .o files and link. Free Pascal
automatically links when compiling the main program, but then the
executable needs to be copied into the bundle (I use a script phase at
the end of the target). Unsure as yet how I'll get some of my C 'bridge'
code to integrate into this...


- When a C source file is in the target, Xcode zooms off to compile and
link it *before* doing any of the Pascal (custom script) build steps.
It's getting mad at the missing _main that somebody else mentioned here.
I hope that I can put the C code into a 'library' target, then figure
out how to get it to link with my Pascal code.


I'm working on a Carbon project, and once I get more figured out, I hope
to be able to make updated templates that will work with Xcode 2.1 and
Free Pascal.


I haven't found anything useful on the xcode-users archive, at least not
with the search terms I have tried.


Here's my compile script for Pascal source (in the target Rules):

echo Compiling $INPUT_FILE_NAME
if [ $BUILD_STYLE = Debug ]; then
echo "Build Style = Debug"
/usr/local/bin/ppcppc $INPUT_FILE_NAME -Ci -Co -g -gl -O1 -vr
-Mmacpas -Tdarwin -k"-framework Carbon"
-Fi/Developer/Pascal/UPInterfaces -Fu/Developer/Pascal/UPInterfaces
-FE$OBJECT_FILE_DIR -o$INPUT_FILE_BASE.o
else
echo "Build Style = Release"
/usr/local/bin/ppcppc $INPUT_FILE_NAME -O3 -vr -Xs -Mmacpas - Tdarwin
-k"-framework Carbon -prebind" -Fi/Developer/Pascal/UPInterfaces
-Fu/Developer/Pascal/UPInterfaces -FE$OBJECT_FILE_DIR
-o$INPUT_FILE_BASE.o
fi


With this specified as 'output files':

$(OBJECT_FILE_DIR)/$(INPUT_FILE_BASE).o

NOTE: careful where you use $(...), it's picky.
--
Mike Casteel
email@hidden                   Seattle, WA
 _______________________________________________
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


_______________________________________________ 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: Non-Apple compiler integration in Xcode 2.1
      • From: David Ewing <email@hidden>
References: 
 >Non-Apple compiler integration in Xcode 2.1 (From: Michael Casteel <email@hidden>)

  • Prev by Date: Re: GCC 4.0 GetKeys() and BigEndianLong for Intel
  • Next by Date: Re: xcode error on create new project or open created project
  • Previous by thread: Non-Apple compiler integration in Xcode 2.1
  • Next by thread: Re: Non-Apple compiler integration in Xcode 2.1
  • Index(es):
    • Date
    • Thread