Compile Ada in Xcode

Hi.
I have a problem with compiling Ada in Xcode. Does someone have a guide for installing an Ada compilator for Xcode? I thought that gcc 4.0 had an Ada compilator but I can't get it to work. I have the latest version of Xcode.
I have followed this guide but it doesn't work (http://pyrite.truman.edu/~millerj/AdaonOSX/).
I have to use Ada for a project in school so I would really appreciate some help.
MacBook   Mac OS X (10.4.8)  
MacBook   Mac OS X (10.4.8)  

What problems, specifically, are you having?
The website you linked to contained the following:
If you experience problems getting your system patched and configured to compile Ada code, I strongly recommend the gnat-osx mailing list as a resource for getting your questions answered. The members of that community are knowledgeable and quick to respond to questions. (You'll also note that that community is deeply involved in the macada.org project.)
The author of that site is clearly more knowledgeable about running Ada on MacOS X than probably anyone here. I wouldn't wait around for an answer on the Apple support forums. Post your question to the gnat-osx mailing list and be really, really specific.

Similar Messages

  • Compile swc from Xcode ?

    Hi !
    I've been trying to compile my swc directly from xcode via "External Target" and a Makefile.
    Xcode claims that it can't find AS3.h and my project doesn't compile. It looks like the alc-on command is not launched before the build phase and it compiles with apple's gcc. I've tried to put this command directly inside de makefile :
    myLib.swc: $(OBJ)
         alc-on;
         $(CC) $(CFLAGS) -swc -o myLib.swc $(OBJ) $(LDFLAGS);
         alc-off;
    but well.. this just doesn't work
    I'm fairly new to Xcode and C / Makefiles, so I'm not sure where to go now.
    Is there any way to run these commands before the build in Xcode or directly inside the Makefile?
    Thanks for your help!

    What problems, specifically, are you having?
    The website you linked to contained the following:
    If you experience problems getting your system patched and configured to compile Ada code, I strongly recommend the gnat-osx mailing list as a resource for getting your questions answered. The members of that community are knowledgeable and quick to respond to questions. (You'll also note that that community is deeply involved in the macada.org project.)
    The author of that site is clearly more knowledgeable about running Ada on MacOS X than probably anyone here. I wouldn't wait around for an answer on the Apple support forums. Post your question to the gnat-osx mailing list and be really, really specific.

  • How to enable ada in xcode

    I'm studying computer science and I have to write my programs in ada. I know that xcode has langspec file for ada in it's Library but I dont't know how to enable it. It would be great if somebody could tell me how to enable it. I tried searching google but all I can find is old stuff that doesn't work for xcode 4.
    thanks,
    Simon

    Given that the Apple compiler is Clang, that GCC has been frozen at 4.2.1 and officially deprecated and that GCC will almost certainly be removed (sooner or later) from the developer tools...I think there will be no support for Ada in the future.
    In fact, Clang will almost certainly never support anything but "C" family languages.  You could always build a newer version of GCC yourself and use GCC or LLVM-GCC for Ada afterwards...but you still won't have all the bells and whistles available in Xcode, like syntax highlighting, because you're basically rolling your own development environment.
    You might want to look into DragonEgg.

  • Compiled Error in Xcode for iphone game and other questions

    Dear all,
    Hi, I am a newbie of xcode and objective-c and I have a few questions regarding to the code sample of a game attached below. It is written in objective C, Xcode for iphone4 simulator. It is part of the code of 'ball bounce against brick" game. Instead of creating the image by IB, the code supposes to create (programmatically) 5 X 4 bricks using 4 different kinds of bricks pictures (bricktype1.png...). I have the bricks defined in .h file properly and method written in .m.
    My questions are for the following code:
    - (void)initializeBricks
    brickTypes[0] = @"bricktype1.png";
    brickTypes[1] = @"bricktype2.png";
    brickTypes[2] = @"bricktype3.png";
    brickTypes[3] = @"bricktype4.png";
    int count = 0;`
    for (int y = 0; y < BRICKS_HEIGHT; y++)
    for (int x = 0; x < BRICKS_WIDTH; x++)
    - Line1 UIImage *image = [ImageCache loadImage:brickTypes[count++ % 4]];
    - Line2 bricks[x][y] = [[[UIImageView alloc] initWithImage:image] autorelease];
    - Line3 CGRect newFrame = bricks[x][y].frame;
    - Line4 newFrame.origin = CGPointMake(x * 64, (y * 40) + 50);
    - Line5 bricks[x][y].frame = newFrame;
    - Line6 [self.view addSubview:bricks[x][y]]
    1) When it is compiled, error "ImageCache undeclared" in Line 1. But I have already added the png to the project. What is the problem and how to fix it? (If possible, please suggest code and explain what it does and where to put it.)
    2) How does the following in Line 1 work? Does it assign the element (name of .png) of brickType to image?
    brickTypes[count ++ % 4]
    For instance, returns one of the file name bricktype1.png to the image object? If true, what is the max value of "count", ends at 5? (as X increments 5 times for each Y). But then "count" will exceed the max 'index value' of brickTypes which is 3!
    3) In Line2, does the image object which is being allocated has a name and linked with the .png already at this line *before* it is assigned to brick[x][y]?
    4) What do Line3 and Line5 do? Why newFrame on left in line3 but appears on right in Line5?
    5) What does Line 4 do?
    Thanks
    North

    Hi North -
    macbie wrote:
    1) When it is compiled, error "ImageCache undeclared" in Line 1. ...
    UIImage *image = [ImageCache loadImage:brickTypes[count++ % 4]]; // Line 1
    The compiler is telling you it doesn't know what ImageCache refers to. Is ImageCache the name of a custom class? In that case you may have omitted #import "ImageCache.h". Else if ImageCache refers to an instance of some class, where is that declaration made? I can't tell you how to code the missing piece(s) because I can't guess the answers to these questions.
    Btw, if the png file images were already the correct size, it looks like you could substitute this for Line 1:
    UIImage *image = [UIImage imageNamed:brickTypes[count++ % 4]]; // Line 1
    2) How does the following in Line 1 work? Does it assign the element (name of .png) of brickType to image?
    brickTypes[count ++ % 4]
    Though you don't show the declaration of brickTypes, it appears to be a "C" array of NSString object pointers. Thus brickTypes[0] is the first string, and brickTypes[3] is the last string.
    The expression (count++ % 4) does two things. Firstly, the trailing ++ operator means the variable 'count' will be incremented as soon as the current expression is evaluated. Thus 'count' is zero (its initial value) the first time through the inner loop, its value is one the second time, and two the third time. The following two code blocks do exactly the same thing::
    int index = 0;
    NSString *filename = brickTypes[index++];
    int index = 0;
    NSString *filename = brickTypes[index];
    index = index + 1;
    The percent sign is the "modulus operator" so x%4 means "x modulo 4", which evaluates to the remainder after x is divided by 4. If x starts at 0, and is incremented once everytime through a loop, we'll get the following sequence of values for x%4: 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, ...
    So repeated evaluation of (brickTypes[count++ % 4]) produces the sequence: @"bricktype1.png", @"bricktype2.png", @"bricktype3.png", @"bricktype4.png", @"bricktype1.png", @"bricktype2.png", @"bricktype3.png", @"bricktype4.png", @"bricktype1.png", @"bricktype2.png", ...
    3) In Line2, does the image object which is being allocated has a name and linked with the .png already at this line *before* it is assigned to brick[x][y]?
    Line 2 allocs an object of type UIImageView and specifies the data at 'image' as the picture to be displayed by the new object. Since we immediately assign the address of the new UIImageView object to an element of the 'bricks' array, that address isn't stored in any named variable.
    The new UIImageView object is not associated with the name of the png file from which its picture originated. In fact the UIImage object which inited the UIImageView object is also not associated with that png filename. In other words, once a UIImage object is initialized from the contents of an image file, it's not possible to obtain the name of that file from the UIImage object. Note when you add a png media object to a UIImageView object in IB, the filename of the png resource will be retained and used to identify the image view object. But AFAIK, unless you explicitly save it somewhere in your code, that filename will not be available at run time.
    4) What do Line3 and Line5 do? Why newFrame on left in line3 but appears on right in Line5?
    5) What does Line 4 do?
    In Line 2 we've set the current element of 'bricks' to the address of a new UIImageView object which will display one of the 4 brick types. By default, the frame of a UIImageView object is set to the size of the image which initialized it. So after Line 2, we know that frame.size for the current array element is correct (assuming the image size of the original png file was what we want to display, or assuming that the purpose of [ImageCache loadImage:...] is to adjust the png size).
    Then in Line 3, we set the rectangle named newFrame to the frame of the current array element, i.e. to the frame of the UIImageView object whose address is stored in the current array element. So now we have a rectangle whose size (width, height) is correct for the image to be displayed. But where will this rectangle be placed on the superview? The placement of this rectangle is determined by its origin.
    Line 4 computes the origin we want. Now we have a rectangle with both the correct size and the correct origin.
    Line 5 sets the frame of the new UIImageView object to the rectangle we constructed in Lines 3 and 4. When that object is then added to the superview in Line 6, it will display an image of the correct size at the correct position.
    - Ray

  • How to compile c in xcode

    I have c source which creates in Linux.
    In xcode i need to build that using gcc. i have implemented the source to xcode, Projects create via Command Line Tools and implemented then i build it.
    When i build it, i have received the following error
    Apple Mach -O Linker (ld) Error
    "_methodInit", referenced from:
    methodname in filename.o
    Ld /Users/msys/Library/Developer/Xcode/DerivedData/ExampleProject-enpthcwhgkkobdap hvswbswsedvv/Build/Products/Debug/ExampleProject normal x86_64
        cd /Users/msys/Documents/MyApp/ExampleProject
        export MACOSX_DEPLOYMENT_TARGET=10.9
        /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/ SDKs/MacOSX10.9.sdk -L/Users/msys/Library/Developer/Xcode/DerivedData/ExampleProject-enpthcwhgkkobd aphvswbswsedvv/Build/Products/Debug -L/usr/local/lib -F/Users/msys/Library/Developer/Xcode/DerivedData/ExampleProject-enpthcwhgkkobd aphvswbswsedvv/Build/Products/Debug -filelist /Users/msys/Library/Developer/Xcode/DerivedData/ExampleProject-enpthcwhgkkobdap hvswbswsedvv/Build/Intermediates/ExampleProject.build/Debug/ExampleProject.build /Objects-normal/x86_64/ExampleProject.LinkFileList -mmacosx-version-min=10.9 -ObjC -all_load -framework SystemConfiguration -framework Foundation -framework CoreData -framework CFNetwork -Xlinker -dependency_info -Xlinker /Users/msys/Library/Developer/Xcode/DerivedData/ExampleProject-enpthcwhgkkobdap hvswbswsedvv/Build/Intermediates/ExampleProject.build/Debug/ExampleProject.build /Objects-normal/x86_64/ExampleProject_dependency_info.dat -o /Users/msys/Library/Developer/Xcode/DerivedData/ExampleProject-enpthcwhgkkobdap hvswbswsedvv/Build/Products/Debug/ExampleProject
    i hav searched lot of solutions. but the error still same, Please help me to solve this issue. i break this issue long time. i'm waiting for ur reply.
    Thanks for advance. sorry for my english communicates.

    You should create a new command line project, then add your c file to the project (removing the c file that the project already has), then compile.
    To create a new project select the menu item "File > New > Project...":
    Now select the "Command Line Tool":
    Follow the prompt to enter the name of the project, then where to store the project.  When you have completed, click the file main.c and you should see a window like:
    I suggest compiling and running this first.  To run the program select the menu item "Product > Run".  XCode will compile, link, then run the program.  You see the output window appear like:
    Once you have done this.  you can replace the main.c file with your own OR replace the contents of this main.c file with the contents of your file by copy and paste.

  • Problems compiling C in XCODE using VISA / NI

    Hi,
    I'm developing a program in C to communicate with my Tektronix oscilloscope. I inherited this project from a friend (who is currently incommunicado), so I can't talk to him about it.
    Basically, my problem is that my program will not build due to a linker problem. I am using functions from the NI-VISA 5.4 package for OS X 10.8. However, the linker cannot seem to find the correct functions for my system:
    Undefined symbols for architecture x86_64:
      "_viClose", referenced from:
          _setupVI in oscilloscope.o
          _getData in oscilloscope.o
          _closeInstr in oscilloscope.o
      "_viOpen", referenced from:
          _setupVI in oscilloscope.o
      "_viOpenDefaultRM", referenced from:
          _setupVI in oscilloscope.o
      "_viRead", referenced from:
          _setupVI in oscilloscope.o
          _getData in oscilloscope.o
      "_viStatusDesc", referenced from:
          _setupVI in oscilloscope.o
          _getData in oscilloscope.o
      "_viWrite", referenced from:
          _setupVI in oscilloscope.o
          _getData in oscilloscope.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    These are all pretty basic VISA functions. I struggled in just including the correct header file, as
    #include <visa.h>
    didn't work. When I went to the verbose form, it worked:
    #include "/Library/Frameworks/VISA.framework/Versions/A/Headers/visa.h"
    However, then the problem started happening that I'm having now -- the object linker can't find the code for the VISA functions. I've tried changing build architctures from x86_64 to just x86, without avail. I'm currently building in i386 x86. I've also tried (under Build Phases -> Link Binary with Libraries) to link the VISA.framework to the project, but this simply gives the linker error "cannot find VISA".
    I feel like I am missing something very obvious. I'm still operating under the notion that either NI-VISA did not install to the correct location, or that my build settings are incorrect.
    Does anyone have any insight to lend? I've been searching through different forums for help for almost 2 days now, with no avail.

    atucker-hs wrote:
    That is a good point that I hadn't thought of--I didn't run any install operations before installing 5.4. I'll try uninstalling all of 5.4 (there's not an uninstaller; just a text file of files to delete) and then doing a clean install after a restart. I'll let you know how it goes.
    As far as their included examples, I tried to compile them both when I had 5.3 and 5.4 installed. I used gcc from the command line, and there were tons of errors - far more than I have in my XCODE project.
    Did you try the Instruments/NI-VISA/Examples/C/ExamplesProject.pbproj?

  • [Solve]Compile Ada code with integer_IO ,error integer.ads not found.

    Hello all again.
    I do some programming in Ada and i am very fascinated this language.
    I got problem when using integer_IO in my code.
    When it compiling I got strange error integer.ads not found.
    BTW.My compiler is GNAT 4.4.1.
    Thanks for help.
    Last edited by SpeedVin (2010-03-01 17:30:56)

    drcouzelis wrote:
    I also think Ada is fascinating. I wrote a small video game in Ada and I use Ada a little at work.
    "integer_IO" and "Integer_IO" doesn't matter, because Ada is case insensitive.
    I'm not home right now, but I think "Integer_IO" is a subpackage of "Text_IO":
    with Ada.Text_IO.Integer_IO;
    If you want, you can post your code and I'll see if I can compile it.
    Are you an Ada beginner? Even though I have been working with Ada for more than a year now, I still don't think I'm very good at it. I wish there was more documentation and more projects used Ada.
    Yes I'm new  into this language.
    I really won to that there will be more project's/program's written in ADA.
    This is my program code:
    With Text_IO;
    Use Text_IO;
    With Ada.Text_IO.Integer_IO;
    procedure file is
    Age :integer range 0..100;
    begin
    if Age < 18 then
    put_line("BABY!!!");
    else
    put_line("OLD MAN!!!");
    end if;
    end;
    When I try to compile it I get error:
    file.adb:3:17: "Integer_IO" is a nested package, not a compilation unit

  • Compiling java in xcode

    I have just started programing in a java class at school and I was wondering if there is a way to compile and run a java file in xcode without having to go and use the terminal.
    If there is this would make my life a lot easier!
    Thanks in advance!

    What kind of project are you creating? If you create a Java Tool project and add files to the project from Xcode, it should just work. In the Xcode project window's detail view, you should see a column of checkboxes on the right side for each file. If the checkbox is selected, that file is part of the target. Make sure the checkbox is selected for all the Java files you added.
    Adding files to Xcode's ant projects is a pain with Xcode 2.4. I have detailed instructions at the following URL:
    http://www.meandmark.com/xcodetips.html
      Mac OS X (10.4)  

  • How Do I Compile C Without Xcode?

    How do I? I've installed GCC off my Leopard disk and in Terminal, neither the gcc or cc commands work. Could somebody help me please?

    It is possible to avoid the large xcode footprint with the Leopard install. From the OS install disc start with the optional installs and start the XCode Tools -> XCodeTools.mpkg as you would to install the full version of XCode. The key is when you are going through the install and get to the "Installation Type" selection don't click "Install" but rather click the "Customize" option instead. In the menu that follows the "Developer Tools Essentials" is inactive. However, if you deselect all the other options you will be able to deselect it as well. Once everything is deselected, simply select the "UNIX Development Support" and then click the "Install" button and go through the rest of the install. This will allow you to use the gcc compiler with the various libraries etc without the overhead of the XCode GUI components. Open up a terminal and go to town with your builds and allows for the use of makefiles and shell scripts. While this is still a large footprint 500Mb, all things being relative it is still quite small compared to 3.1Gb you would get with the default install.

  • Xcode isn't compiling Java correctly

    when ever i run a Java program from Xcode, I dont see the <filename>.class file. and i dont want to run UNIX all the time. At school we use TextPad and all is compiled. why isnt Xcode doing this?????????

    Hi Marcin
    The .class files are deeply hidden away in the build directory so they're not visible unless you go looking for them using the Finder - most users never bother. As part of the build process (for a Java Tool project) they're copied inside a jar file (Java Archive). When you select the "Build and Go" command, Xcode runs the java compiler to create the class files, then puts them into a jar file, then it runs the JVM, which uses the jar file to load all the classes in your program. All this happens in the background, so usually you're not even aware that it's happening.
    Hope this makes things a bit clearer
    Bob

  • How do I access a .txt file in Xcode for an OSX command line tool?

    I'm in school learning C and C++, and we have to read from and write to .txt files regularly. But I can't figure out how to open a .txt file in Xcode.
    if FILE *buffer = fopen(filename,"r"); where filename is a pointer to a char array holding the name of the file, it works perfectly fine in the terminal. It compiles, in both Xcode and GCC, but when I try to actually open the file in Xcode, my program can never find it and quits the application (so it doesn't crash).
    Long story short, what do I have to do to get my programs in Xcode to read from a .txt file?
    I tried putting a copy of input.txt in every folder within the project, including it in the source files, adding it to target (which I don't wholly understand), I don't know what to do.

    Make sure the filename has an absolute path. If the path is relative it will point to a different location depending on where you run the program from.
    When you run it from within Xcode itself the binary is buried way inside the project hierarchy (you can see where it is by selecting the program in the  Products folder and doing a Show in Finder).
    The safest bet is to always specify a specific directory for any writes you do.
    regards
    As an example for this program in Xcode (assumoing you will be able to see the images)
    The binary is located here

  • Java templates gone from XCode for 10.6

    I went back to rework some Java applets I have written and discovered they don't compile anymore in Xcode (at least as before)
    Hmm. I had Java templates, downloaded the latest XCode and the templates are gone. My 'old' applets won't compile complaining 'Jam is deprecated and has been removed; targets that use Jam must be upgraded to native targets. For more information on doing this, consult the Xcode documentation.'
    I found a separate Java SDK download? From
    http://developer.apple.com/java/download/
    has 10.5 version listed only
    Clicking on the link goes to the (old) log-in page for the Developer program and the download/Java link goes to a page with 10.6 Java downloads - Developer previews.
    Still no Java templates (in Xcode). Maybe I should read the documentation (if I can find where it was installed). I was able to 'compile' the Hello World applets in the organizer window but no 'Hello World' in Safari.
    What's happened to the 'old' system for Java development?

    After installing XCode 3.2.1 there were no Java docs or Java templates. I installed the Java files and docs for 10.6 from the developer site. Searching XCode for Java gives a lot of Javascript items but no easy answers for Java. Using the Organizer window instead of the Xcode project window is a big change. I must have missed it but searching this forum, Xcode and now the java-dev mailing list archive hasn't given me good answers. One answer seems to be to put Mac OS X10.5 on a separate volume, install the older XCode (or current??) and develop Java one OS version back.
    The Hello World applet didn't run for me when I tried it. Blank browser window. Java Preferences seem to default for 10.6
    "Create Java projects in Xcode 3.2 using Xcode's Organizer. Choose Window > Organizer to open the Organizer. Click the + button at the bottom of the Organizer. Choose New From Template > Java Templates." > Java Applets. Build
    BUILD SUCCESSFUL
    Total time: 1 second
    The Debugger has exited with status 0.
    gives a new window in Safari but it is empty.

  • Command line tools for xcode??

    I am used to compiling code much like the java sdk works from terminal where I say javac the filename and then i get a .class file that i can run by doing the command java and then the .class file after. I am now wanting to learn c++ and I dont feel like installing xcode all i want is a compiler that can run from terminal. i found command line tools for xcode on the apple developers site and i was wondering do i need xcode for this to run and after that what the commands are and how i compile/run the code. But my biggest question is still wether or not i need xcode to let command line tools work. ive read in a couple places i dont need it but in other ive read you do can i get help?!

    You don't need Xcode to compile your apps with; just the compiler/linker.
    Xcode is Apple's IDE.  One could write the same code in TextEdit but that wouldn't be easy nor fun.
    (Missed it by THAT much!) 

  • Find xCode 3 on MacBook after installing it

    Dear follow members of Apple Support Communities,
    I have search for this topic. Sadly, I cannot find an answer. I find topics regarding problem with compiling program using xCode.
    Now, I have tried to install xCode version 3 from my Leopard disc. It was sucessfull. But now I cannot locate the program to start it. When opening the Program-file, xCode is not shown.
    I am running Apple Mac OS X version 10.6.7 on a MacBook (from late 2006 when searching on my S/N) with administrating rights.
    Thank you for reading my post
    Yours Truly
    WinkyApple

    Stress Test wrote:
    Do you have a "Developer" folder inside your hard drive?
    Thank you very much! I found it now and it is starting! Weei !
    10 points for correct answer to you!

  • Problems with a xcode project

    Hi there,
    I'm trying to compile an existing Xcode project which has used boost library and threadpool library. I have already added the correct header path and library path, and the boost has been successfully compiled(cause the code uses libboost_thread.a).
    Here's my header search path:
    /usr/local/installation/prefix/include(boost header after installed)
    /usr/local/boost1_450
    /Users/niexiao2008/threadpool-025-src/threadpool/boost
    And the library search path is:
    /usr/local/installation/prefix/lib
    I'm sure the boost library has been installed correctly and passed through some test codes, but there's still some problems when buliding the project:
    i686-apple-darwin10-gcc-4.2.1: error trying to exec '/Developer/usr/bin/../libexec/gcc/i686-apple-darwin10/4.2.1/cc1plus': execv: Argument list too long
    Command /Developer/usr/bin/gcc-4.2 failed with exit code 1
    Could someone please help?

    In the Build results window select the compile line that is failing. This should reveal a 'details' icon on the line to the right. Click the icon to display the actual compile command and try to determine why the argument list is too long.

Maybe you are looking for