[Unison-hackers] XCode expert needed

Steve Kalkwarf steve at kalkwarf.com
Sat Mar 22 23:06:04 EDT 2008


Alan,

>Now when using the "Build" button of XCode, compilation fails 
>because these include files are not found, which makes sense as 
>I do not say where they are. In order to debug, I want to build 
>from XCode GUI, so I would like to either:
>- specify OCAMLLIBDIR such that it is correctly set when 
>building with XCode's GUI, or
>- add an include path to the project

I think the easiest thing to do is make sure you have a copy of 
ocaml installed in /usr/local/lib/ocaml. The GUI shows this 
argument to gcc:

     -I/usr/local/lib/ocaml

If for some reason that's not possible, the next choice would be 
to set an additional Header directory. Using Xcode 3.0:

     Open the project file;
     Select "uimac" (the top node) in the Groups and Files column;
     Choose Project->Edit Project Settings (Command-I, build tab);
     Ensure that All Configurations is chosen from the 
Configuration menu;
     Double Click Header Search Paths in the Search Paths section;
     Fill in the path to your includes directory.

While looking at the project file, there are a couple 
recommendations I'd like to make:

This project file uses "Current Mac OS" as its target SDK. For 
more predictable build results across multiple machines, I'd 
recommend choosing either the 10.4u SDK or the 10.5 SDK.

Second, if this were my project, I'd change the architecture 
settings to $(NATIVE_ARCH) for development and "i386 ppc" for deployment.

I'd also rename Deployment to Release, and Development to Debug, 
and delete Default. Those are the new blessed build styles Apple 
uses, and I've always found that moving to newer Xcodes works 
better with the new default names.

>If you can explain me why positioning this variable result in 
>adding the include path, it would even be better!

I don't understand the question: I think a word got dropped or mistyped.

Hope this is enough to get you moving.

Feel free to write if what I suggested isn't helpful for you. I 
don't have enough parts here to build Unison, but the files that 
needed ocaml to build do successfully build with /usr/lib 
populated as suggested

Steve



More information about the Unison-hackers mailing list