RubyCocoa

  • OK,
    I loved all the 'hype' about RubyCocoa so I thought I'd jump in...
    First install XCode 3.0, no real issues...
    Second try a RubyCocoa example... ahh issues :) Just like the good old
    days :)

    OK so i'm trying to compile _any_ of the example RubyCocoa code in
    Examples/Ruby/RubyCocoa
    Take RoundTransparentWindow for instance...
    It won't compile off-the-bat.
    But a new RubyCocoa application from "File > New Project" will, so I
    thought I'd just copy the setup from that...

    Anway long story short it's still not compiling...
    I have the RubyCocoa framework installed, but it still can't find
    RubyCocoa/RBRuntime.h
    It seems you have to import the Cocoa.h beforehand, but this isn't
    working because I get many errors about 'unable to find
    WebServicesCore.h' and others...

    I've cleaned my project and I still get the same errors.

    Has anybody tried compiling any of the RubyCocoa example projects?

    TIA,
    -Adam
  • On Nov 1, 2007, at 10:09 PM, Adam Salter wrote:
    > I have the RubyCocoa framework installed, but it still can't find
    > RubyCocoa/RBRuntime.h

    Leopard?

    You installed RubyCocoa.framework on Leopard?

    Did you try with stock Leopard Dev Tools?

    For PyObjC, the one person that reported failures had a legacy Python
    2.5 install when he upgraded from Tiger.  Removal of that fixed
    everything.

    What is the exact set of errors?

    b.bum
  • Sorry it took a while to get back to you...

    No I didn't install anything on Leopard... is that my mistake?

    Ok to confirm step by step:
    1. I open RoundTransparentWindow.xcodeproj from Examples folder
    2. I do Build from build menu.
    3. I get:

    CompileC /Developer/Examples/Ruby/RubyCocoa/RoundTransparentWindow/
    build/RoundTransparentWindow.build/Deployment/
    RoundTransparentWindow.build/Objects-normal/i386/main.o main.m
        /Developer/usr/bin/gcc-4.0  -c -I/Developer/Examples/Ruby/
    RubyCocoa/RoundTransparentWindow/build/RoundTransparentWindow.build/
    Deployment/RoundTransparentWindow.build/RoundTransparentWindow.hmap  -
    F/Developer/Examples/Ruby/RubyCocoa/RoundTransparentWindow/build/
    Deployment  -I/Developer/Examples/Ruby/RubyCocoa/
    RoundTransparentWindow/build/Deployment/include  -arch i386 -fno-
    common -fpascal-strings -Os -Wmost -Wno-four-char-constants -Wno-
    unknown-pragmas -pipe "-fmessage-length=0" -mdynamic-no-pic -g
    main.m  -o /Developer/Examples/Ruby/RubyCocoa/RoundTransparentWindow/
    build/RoundTransparentWindow.build/Deployment/
    RoundTransparentWindow.build/Objects-normal/i386/main.o
    main.m:1:32: error: RubyCocoa/RBRuntime.h: No such file or directory
    main.m: In function 'main':
    main.m:5: warning: implicit declaration of function 'RBApplicationMain'

    RubyCocoa is listed in linked frameworks...

    I noticed that new RubyCocoa projects import Cocoa.h, so if I try that
    I get:

    CompileC /Developer/Examples/Ruby/RubyCocoa/RoundTransparentWindow/
    build/RoundTransparentWindow.build/Deployment/
    RoundTransparentWindow.build/Objects-normal/i386/main.o
    ...failed CompileC /Developer/Examples/Ruby/RubyCocoa/
    RoundTransparentWindow/build/RoundTransparentWindow.build/Deployment/
    RoundTransparentWindow.build/Objects-normal/i386/main.o ...

    CompileC /Developer/Examples/Ruby/RubyCocoa/RoundTransparentWindow/
    build/RoundTransparentWindow.build/Deployment/
    RoundTransparentWindow.build/Objects-normal/i386/main.o main.m
        /Developer/usr/bin/gcc-4.0  -c -I/Developer/Examples/Ruby/
    RubyCocoa/RoundTransparentWindow/build/RoundTransparentWindow.build/
    Deployment/RoundTransparentWindow.build/RoundTransparentWindow.hmap  -
    F/Developer/Examples/Ruby/RubyCocoa/RoundTransparentWindow/build/
    Deployment  -I/Developer/Examples/Ruby/RubyCocoa/
    RoundTransparentWindow/build/Deployment/include  -arch i386 -fno-
    common -fpascal-strings -Os -Wmost -Wno-four-char-constants -Wno-
    unknown-pragmas -pipe "-fmessage-length=0" -mdynamic-no-pic -g
    main.m  -o /Developer/Examples/Ruby/RubyCocoa/RoundTransparentWindow/
    build/RoundTransparentWindow.build/Deployment/
    RoundTransparentWindow.build/Objects-normal/i386/main.o
    In file included from /System/Library/Frameworks/
    ApplicationServices.framework/Headers/ApplicationServices.h:20,
                      from /System/Library/Frameworks/Foundation.framework/
    Headers/NSAppleEventDescriptor.h:8,
                      from /System/Library/Frameworks/Foundation.framework/
    Headers/Foundation.h:104,
                      from /System/Library/Frameworks/Cocoa.framework/
    Headers/Cocoa.h:12,
                      from main.m:1:
    [...Snip...]
    /System/Library/Frameworks/Foundation.framework/Headers/
    NSAppleEventDescriptor.h:14: error: syntax error before 'AEDesc'
    /System/Library/Frameworks/Foundation.framework/Headers/
    NSAppleEventDescriptor.h:24: error: syntax error before 'DescType'
    /System/Library/Frameworks/Foundation.framework/Headers/
    NSAppleEventDescriptor.h:26: error: syntax error before 'DescType'
    /System/Library/Frameworks/Foundation.framework/Headers/
    NSAppleEventDescriptor.h:30: fatal error: method definition not in
    @implementation context
    compilation terminated.
    {standard input}:32:FATAL:.abort  detected.  Assembly stopping.

    A brand new RubyCocoa project compiles fine though... so I'm at a loss
    as to what it is...

    -Adam

    On 02/11/2007, at 4:45 PM, Bill Bumgarner wrote:

    > On Nov 1, 2007, at 10:09 PM, Adam Salter wrote:
    >> I have the RubyCocoa framework installed, but it still can't find
    >> RubyCocoa/RBRuntime.h
    >
    > Leopard?
    >
    > You installed RubyCocoa.framework on Leopard?
    >
    > Did you try with stock Leopard Dev Tools?
    >
    > For PyObjC, the one person that reported failures had a legacy
    > Python 2.5 install when he upgraded from Tiger.  Removal of that
    > fixed everything.
    >
    > What is the exact set of errors?
    >
    > b.bum
    >
  • On Nov 4, 2007, at 4:33 PM, Adam Salter wrote:
    > A brand new RubyCocoa project compiles fine though... so I'm at a
    > loss as to what it is...

    It looks like one of two things may be going on:

    (1) you have targeted the 10.4u SDK instead of the 10.5 SDK.  See the
    project build settings.  Or, there may be some other weirdness going
    on-- compiler flag or something that is non-standard.

    (2) you have one of those wonky syntax errors that occasionally
    happens in C that causes masses of syntax errors in imported files
    without actually telling you were the real problem is.

    b.bum
previous month november 2007 next month
MTWTFSS
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
Go to today