Xcode errors on compile

Hello,
I'm trying to compile some sample code from a book on objective C. I've got xcode 4.2 installed on my old macbook pro with snow leopard (10.6.8, 32 bit core duo). I compiled the code on another macbook pro with lion and the code ran just fine with no errors. It looks like a syntax error of some kind but everything was copy/pasted and I even set xcode to run as 32 bit since the default is 64. Any ideas?

also.. that doesn't really explain why it would run on another computer but not this one.. Is it a feature that can only be run on the 10.7 sdk? or Lion?

Similar Messages

  • Xcode Error won't compile any new projects!?

    If you can help, please do. I have been having this problem for a whole day now and its really becoming a pain in the head.
    Whenever I create a new project (Im working in C and Objective-C) even if don't write any code and just try and run the starter ("hello world") code it returns this error....
    ld: file not found: /Developer/TomsXcode/build/Toms_Xcode.build/Debug/Toms_Xcode.build/Objects-normal/x86_64/TomsXcode.o
    Command /Developer/usr/bin/gcc-4.2 failed with exit code 1
    So far what I have done is;
    Completely uninstalled Xcode and its Library's using the command line in Terminal
    Installed the new version of Xcode (3.2.3)
    Result: Error message is still there...
    I have absolutely no clue what to do.
    Thanks so much if you can help! :/

    It looks like this problem was resolved (congratulations!) in your recent cross post, [Re: XCode Error -> Nothing will compile at all|http://discussions.apple.com/thread.jspa?messageID=12058548&#12058548]. Here are the instructions on closing a thread: [http://discussions.apple.com/help.jspa#answers].
    \- Ray

  • Issues installing ruby 1.9.3 - error: C compiler cannot create executables

    I am trying to install ruby 1.9.3 on my Macbook pro but I've run into a wall.
    Here are the essentials;
    OS: OS X 10.7.3
    Xcode: 4.3
    When I run the rvm command I get the following...
    "rvm install 1.9.3"
    Fetching yaml-0.1.4.tar.gz to /Users/vindigo/.ram/archives
    Extracting yaml-0.1.4.tar.gz to /Users/vindigo/.rvm/src
    Configuring yaml in /Users/vindigo/.rvm/src/yaml-0.1.4.
    Error running ' ./configure --prefix="/Users/vindigo/.rvm/usr"  ', please read /Users/vindigo/.rvm/log/ruby-1.9.3-p125/yaml/configure.log
    Compiling yaml in /Users/vindigo/.rvm/src/yaml-0.1.4.
    Error running 'make ', please read /Users/vindigo/.rvm/log/ruby-1.9.3-p125/yaml/make.log
    Database file /Users/vindigo/.rvm/config/packages does not exist.
    Installing Ruby from source to: /Users/vindigo/.rvm/rubies/ruby-1.9.3-p125, this may take a while depending on your cpu(s)...
    ruby-1.9.3-p125 - #fetching
    ruby-1.9.3-p125 - #extracted to /Users/vindigo/.rvm/src/ruby-1.9.3-p125 (already extracted)
    ruby-1.9.3-p125 - #configuring
    Error running ' ./configure --prefix=/Users/vindigo/.rvm/rubies/ruby-1.9.3-p125 --enable-shared --disable-install-doc --with-libyaml --with-opt-dir=/Users/vindigo/.rvm/usr ', please read /Users/vindigo/.rvm/log/ruby-1.9.3-p125/configure.log
    There has been an error while running configure. Halting the installation.
    CONFIGURE.LOG
    [2012-02-26 14:56:49]  ./configure --prefix="/Users/vindigo/.rvm/usr" 
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... config/install-sh -c -d
    checking for gawk... no
    checking for mawk... no
    checking for nawk... no
    checking for awk... awk
    checking whether make sets $(MAKE)... yes
    checking for gcc... gcc
    checking whether the C compiler works... no
    configure: error: in `/Users/vindigo/.rvm/src/yaml-0.1.4':
    configure: error: C compiler cannot create executables
    See `config.log' for more details
    MAKE.LOG
    make: *** No targets specified and no makefile found.  Stop.
    Another suggestion I received was to use the following command...
    "rvm install 1.9.3 --with-gcc=clang"
    but I get the same results.
    At this point I've exhausted my options and I am not sure what to try next, other than starting from scratch and reloading the entire OS.
    Any help would be greatly appreaciated.
    Thanks,
    Rich

    Phew!  That was harrowing.
    Found this, and it solved the problem.  Refreshingly, it was written in English and done well at that! 
    http://pragmaticstudio.com/blog/2010/9/23/install-rails-ruby-mac
    Follow all the instructions.  The main missing ingredient for me was downloading the developer tools for the command line from Apple.  I had to register there, but it was free. These tools seemed to install the compiler where it was needed.  You might need a github something or other, I don't know.  I think I downloaded it as some point.  Anyway, I did everything this author told me, and now I have my first rails app!  Good luck - Joel

  • Xcode will not compile

    I migrated from Windows C++(Dev C++) to Mac (Xcode) and Xcode will not compile, the command for it is greyed out (not selectable). Even Hello World Wouldn't compile. What am I doing wrong here?
    (this is an empty C++ file that's been opened)

    What kind of application do I want to open for basic C++. I've tried numerous now and I always get at least one error of conflicting commands.

  • Gcc error :  C compiler cannot create executables

    +I am getting the same error from all my Configure scripts+.
    checking whether make sets $(MAKE)... yes
    checking for gcc... gcc
    checking for C compiler default output... configure: error: C compiler cannot create executables
    See `config.log' for more details.
    +config.log shows:+
    configure:1728: checking for gcc
    configure:1744: found /usr/bin/gcc
    configure:1754: result: gcc
    configure:1998: checking for C compiler version
    configure:2001: gcc --version </dev/null >&5
    2.95.2
    configure:2004: $? = 0
    configure:2006: gcc -v </dev/null >&5
    Reading specs from /usr/libexec/gcc/darwin/ppc/2.95.2/specs
    Apple Computer, Inc. version gcc-938, based on gcc version 2.95.2 19991024 (release)
    configure:2009: $? = 0
    configure:2011: gcc -V </dev/null >&5
    gcc: argument to `-V' is missing
    configure:2014: $? = 1
    configure:2038: checking for C compiler default output
    configure:2041: gcc conftest.c >&5
    dyld: lazy symbol binding failed: Symbol not found: _NXOpenFile
    Referenced from: /usr/libexec/gcc/darwin/ppc/cpp-precomp
    Expected in: /usr/lib/libSystem.B.dylib
    dyld: Symbol not found: _NXOpenFile
    Referenced from: /usr/libexec/gcc/darwin/ppc/cpp-precomp
    Expected in: /usr/lib/libSystem.B.dylib
    gcc: Internal compiler error: program cpp-precomp got fatal signal 5
    configure:2044: $? = 1
    configure: failed program was:
    | #line 2017 "configure"
    +The simplest compile has essentially the same error:+
    gcc hello.c
    dyld: lazy symbol binding failed: Symbol not found: _NXOpenFile
    Referenced from: /usr/libexec/gcc/darwin/ppc/cpp-precomp
    Expected in: /usr/lib/libSystem.B.dylib
    dyld: Symbol not found: _NXOpenFile
    Referenced from: /usr/libexec/gcc/darwin/ppc/cpp-precomp
    Expected in: /usr/lib/libSystem.B.dylib
    gcc: Internal compiler error: program cpp-precomp got fatal signal 5
    I'm stumped. This is Mac OS 10.6.5 Snow Leopard; 2 Ghz Intel Core 2 Duo; 4 G RAM.
    gcc2.95.2.pkg installed.
    X11SDK.pkg installed
    This all began when I moved to to MacBook from my old iBook.

    The Snow Leopard install CD has a sub-directory "Optional Installs" which holds a package "Xcode.mpkg". Installing Xcode.mpkg fixed my problem. My compiler is running fine now.

  • Error on compile - non-static variable can not be referencedfrom static con

    Error on compile happening with addButton?
    Thanks
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.JButton;
    import javax.swing.JLabel;
    import javax.swing.JTextField;
    import javax.swing.JFrame;
    public class Log implements ActionListener {
    JButton addButton;
    public static void addComponentsToPane(Container pane) {
    pane.setLayout(new GridBagLayout());
    GridBagConstraints c = new GridBagConstraints();
         c.gridy = 3;
    c.gridx = 0;
         JLabel callsignLabel= new JLabel("Callsign");
    pane.add(callsignLabel, c);
         c.gridy = 3;
    c.gridx = 1;
         JLabel nameLabel= new JLabel("Name");
    pane.add(nameLabel, c);
         c.gridy = 3;
    c.gridx = 2;
         JLabel timeLabel= new JLabel("Time");
    pane.add(timeLabel, c);
         c.gridy = 3;
    c.gridx = 3;
         JLabel dateLabel= new JLabel("Date");
    pane.add(dateLabel, c);
         c.gridy = 3;
    c.gridx = 4;
         JLabel frequencyLabel= new JLabel("Freq ");
    pane.add(frequencyLabel, c);
         c.gridy = 3;
    c.gridx = 5;
         JLabel locationLabel = new JLabel("Country/State");
    pane.add(locationLabel, c);
    c.gridy = 5;
    c.gridx = 0;
         addButton = new JButton("Add");
    pane.add(addButton, c);
         addButton.addActionListener(this);

    Thank you for the reply
    I am new to Java
    What is wrong with the way it is coded?The error message tells you what's wrong: You're trying to reference a non-static variable from a static context.
    If you don't know what that means, then click the link I provided and look at the results from that google search. You might have to go through a few before you find a satisfactory explanation. And after you've done that, if you have specific questions about things you didn't understand there, please post again.

  • Error while compiling model in Visual Composer 7.1.

    Hi,
    I am getting a error while compiling model in Visual Composer 7.1.
    An exception occurred at the server while running the build process, reason: Extension with id com.sap.vc.runtimeproviders.null not found. For more details please refer to the log file.
    Can any one please tell me what the error is?

    Hello
    This problem usually indicates the model Runtime provider is not set properly
    Please goto configure pane and check the RT provider that is et for the model or any other model in the same DC
    Also services usages require this property to be set accordingly
    To make sure the services are set properly please look into the configuration pane when the respective service usage is selected (and check the same)
    Please let me know if this helped or not
    Guy

  • Error in compiling Flex application: 64K byte limit

    Hi experts ,
    While deploying the VC model , i m getting this error :
    Error in compiling Flex application: Error: A function in the code exceeds the 64K byte limit (actual size = '65557'). Since the problem occurs in the compiler-generated deferred instantiation code, please refactor/componentize portions of this document.
          (/usr/sap/NW2/JC00/j2ee/cluster/server0/GUIMachine_Business_Packages/Contribution_Margin_36461/FLEX_COMPILATION_FOLEDR/AAD15VY.mxml:19)
    Failed to compile AAD15VY.mxml
    Could any one help me out in solving this issue ..its urgent ...
    Your suggestions will be rewarded.
    Thanks,
    Pratima

    You have to remove few components from your model to decrease the compiler generated LOC.
    Check the following link for detailed solution:
    https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=936390
    Taken from SAP Notes:
    <i>Solution
    Doing the following may help:
    1.Divide problematic iViews into a number of nested iViews.
    2.Optimize each model to reduce the number of elements that it
      contains:
      a.Reduce the number of signals by merging signals of the same name.
      b.When your application updates forms with read-only fields, use
        expression boxes and a data store instead of signals.
      c.Minimize the use of animations in your models, including form
        sliding and chart animation effects
      d.Use a data store to store variables, instead of invisible forms.
        To display messages, use a simple text rather than a static dynamic
        expression.
    3.For on-the-spot, temporary workarounds, you can try dragging an empty
      layer onto the Design board. This sometimes solves the problem ad
      hoc, but is not recommended as a best practice.
    </i>

  • Error in compiling flex - 64K limit

    Hi folks,
    I entered a new dimension in the flex compiling error dimension (see error-message below). Can anybody help me? I'm familiar with the 32K-problem ( and do have functional workarounds for that) but this one is a new one for me.
    regards,
    Martin
    Error in compiling Flex application: Error: A function in the code exceeds the 64K byte limit (actual size = '66289'). Since the problem occurs in the compiler-generated deferred instantiation code, please refactor/componentize portions of this document.

    Hi Marcel,
    infortunately I'm not allowed atm to make the model public.
    however, I circeled the problem and found a workaround. It has nothing to do with our "old pal 32K", this time it simply was a (sub-)model too large to get deployed (problem with the to-build XML-pakages.)
    Background on this: It's a nested iview collecting a lot of data from different parts of a highliy complex model to process an RFC. For monitoring reasons I've switched some of the tables to visible and that acutally caused the error. After hiding the colums the error vanished. (actually was replaced by the 32K error. But that's like meeting an old friend, no problem any more....)
    I'm looking forward to sharing the model some time. Would be interesting to get some feedback from the comunity..
    regards,
    Martin
    Message was edited by:
            Martin Wolpers

  • Error in compiling flex compilation

    Hi,
    I recieve following log message after deploying my application:
    Error in compiling Flex application:
    Error: Branch between 8479 and 41869 around line 0 exceeds 32K span.
    If possible, please refactor this component.
    Failed to compile AAD8T3.mxml
    The only thing I know is the iView that has code AAD8T3, so I suppose the error is in it.
    But what is the error and what are the objects it relates to?
    Thanks,
    Yulia

    Hi
    This is solved for Flex2, the up comming version of VC does not have this problem, but release dates for it are not set.
    Jarrod Williams

  • Getting a bad bind variable error while compiling a custom form in R12

    Hi,
    I am getting a bad bind variable error while compiling a custom form.
    I tried setting the forms_path variable and I am still getting the error. Can anyone please suggest what can be done?
    DECLARE
    BEGIN
    IF :parameter.p_line_ship_to = 'T'
    THEN
    IF :SYSTEM.cursor_item = 'LINE.SHIP_TO'
    THEN
    :parameter.lov_num_param1 := :line.ship_to_customer_id;
    oe_lines.ship_to ('WHEN-VALIDATE-ITEM');
    :parameter.lov_num_param1 := :line.ship_to_customer_id;
    END IF;
    :parameter.p_line_ship_to := 'F';
    END IF;
    END;
    I am getting this error:
    Bad bind variable 'parameter.p_line_ship_to'

    The Parameter is not defined in the form.. But, this form is already been compiled and deployed.. I have to make some changes to the form and tried to compile it, when i am getting this error. Is it possible that the parameter would be defined in some other form or can this error be due to some other reasons?
    Thanks in Advance.

  • Error while compiling the PO Item Category KFF

    Kindly help me. I am new and learning Purchasing module and now stuck because of an error while compiling the PO Item Category KFF. This is because a segment is saved in the database incompletely.
    Now the segment does not show in the Segments Summary form. But when I enter the same Number, I get the error APP-FND-00924: You chose a sement number that is used by another segment.
    When I freeze and compile the structure with different segments, I get the error
    APP-FND-00668: The data that defines the flexfield on this field may be inconsistent. Inform your system administrator that the function: FDFRKS could not find the structure definition for the flexfield specified by Application = &APPL, Code = MCAT and Structure number = 201 (APPID=401)
    APP-FND-00738: Error detected when attempting to load value set on Context: &CONTEXT for Segment: &SEGMENT in Routine: FDFBKS
    APP-FND-01564: ORACLE error 1403 in FDFAVS3
    Cause: FDFAVS3 failed due to ORA-01403: no data found.
    The SQL statement being executed at the time of the error was:  and was executed from the file &ERRFILE.
    Regards
    Reem

    Hi Sandeep
    Sorry that I am bothering with basic questions, but I am not able to run any Select queries. It gives error Table or View does not exist. I can see the table from ALL_TABLES view, but I cannot Select.
    I have logged in as oracle user. This is not Vision datbase. Can you let me know the default dba user and password or how to get the permission?
    Regards
    Reem

  • Error while compiling Model in VC 7.1

    Hi,
    I am getting a error while compiling model in Visual Composer 7.1.
    An exception occurred at the server while running the build process, reason: Extension with id com.sap.vc.runtimeproviders.null not found. For more details please refer to the log file.
    Can any one please tell me what the error is?

    Hi
    The common reason for this kind of error is a misconfigured model or data service proxy
    To verify this is not the case please follow these steps:
    1. In the DC where you get the error open your models one by one and verify that the runtime provider that is configured is set properly (usually should be WebDynpro but could be Voice or Portal if this is the runtime that you are targeting your application to)
    This configuration is accessible in the configure panel when your model is in focus
    2. Do the same as described in bullet 1 on your data services' usages as well. Select the usage of the data service and check that the runtime provider is set properly
    3. remove any unused service in your DC (this is a good practive regardless of the current problem. To view your data services in a certain DC open the "Manage Models Dialog". Select the "Data Services" entry in the filter dropdown on the top right corner. Drill down into the DC you are clearing and delete services you do not think they are in use. Please note that removing a service must be done carefully since you might delete services that could be in use by other models in the same DC or by dynamic entry list of a control in your model, etc.)
    Please let me know if it helped
    Guy

  • Error while compiling java file using J2SE 1.5.0

    Dear Sir,
    I'm getting the following error while compiling the java file.The code is also given.
    package test;
    public class TestRowSet {
    public TestRowSet() {
    "TestRowSet.java": cannot access java.lang.Object,bad class file: D:\Program Files\Java\jdk1.5.0\jre\lib\rt.jar\java\lang\Object.class,class file has wrong version 49.0, should be 48.0,Please remove or make sure it appears in the correct subdirectory of the classpath. at line 4, column 1
    Please help me out.
    --Suketu Naik.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    But I'm compiling within "Borland JBuilder 9.0". I've
    set the JDK path of the current project to point to
    the path of JDK 1.5.0 . I've also tried to compile at
    command prompt with "javac". I'm getting the same
    error of "Undefinedclassloader" with long StatckTrace.
    I don't know anything about JBuilder either. If you use the command prompt and enter the full path to the 1.5 javac.exe then that will prove whether the issue is using an older javac or not. For example "c:\j2sdk1.5.0_01\bin\javac HelloWorld.java"

  • Error While Compiling Jdbc Application

    Hi,
    I am getting an error while compiling a JDBC application ... as shon below...
    please help me regardinmg this and also please specify how to include jar file ....
    JdbcApp.java:5: package Oracle.jdbc.driver does not exist
    DriverManager.registerDriver(new Oracle.jdbc.driver.OracleDriver());

    Thanx for that!!!
    but i am still getting the exception...
    D:\Java>java JdbcApp
    Exception in thread "main" java.sql.SQLException: Io exception: The Network Adap
    ter could not establish the connection
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:334)
    at oracle.jdbc.ttc7.TTC7Protocol.handleIOException(TTC7Protocol.java:366
    8)
    at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:353)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:371)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
    va:551)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:351)
    at java.sql.DriverManager.getConnection(DriverManager.java:525)
    at java.sql.DriverManager.getConnection(DriverManager.java:171)
    at JdbcApp.main(JdbcApp.java:7)
    kindly solve this...

Maybe you are looking for