[gecode-users] Mac XCode configuration

Guido Tack tack at gecode.org
Mon Apr 7 02:03:10 CEST 2014


Hi,

to add a system folder such as /usr/local, open the "Add Files to..." dialog, press Command+Shift+G, and enter the path directly.
On the command line, I think Xcode may have changed the default paths for frameworks, you could try adding -F/Library/Frameworks to your compiler options.

Cheers
Guido

On 7 Apr 2014, at 6:26 am, Tomas Lidén <tomas.liden at liu.se> wrote:

> Hi!
> 
> I'm running MacOS 10.9.2, Xcode 5.1 (5B130a) and Gecode 4.2.1 - all freshly updated/installed.
> But being a newbie (both to Xcode and Gecode) and a bit rusty on C++, I have some trouble getting the configurations right..
> 
> Firstly a great thanks for Guido's help regarding libstdc++ (http://www.gecode.org/pipermail/users/2014-April/004368.html) - which got me past the first blocking point.
> 
> But now I can't get Qt to work (e.g. examples/queens.cpp). I can see that qt5.1.0 is installed in /usr/local/ but I can't figure out how to add the necessary frameworks (probably the ones in /usr/local/qt5.1.0/lib/.) to the project. For gecode.framework I use File/Add Files to.. and click to /Library/Frameworks - but /usr/local is inaccessible from the Finder interface.. Is there some other mechanism or do I need to add some soft links or similar? (The Add/Existing Frameworks.. mentioned in MGP 2.3.2 I have not found..)
> 
> BTW, the command line option does not work either as stated in the documentation (MGP 2.3.2), neither with g++ or clang - see the log below. The "default header search path" does not seem to be sufficient.. I guess there's some include or library options that's needed - any help on that as well? (I think this is the reason I have no success in using Eclipse/CDT either..).
> 
> Thanks for any help or tip you can provide, primarily regarding accessing Qt in Xcode!
> /Tomas
> 
> --------- command line log ---------
> $ env
> TERM_PROGRAM=Apple_Terminal
> SHELL=/bin/bash
> TERM=xterm-256color
> TMPDIR=/var/folders/qr/pv91fgrs0x9chlc7_h411hzwz2vd45/T/
> Apple_PubSub_Socket_Render=/tmp/launch-rD5NPz/Render
> TERM_PROGRAM_VERSION=326
> OLDPWD=/Users/tomli64
> TERM_SESSION_ID=C04798D4-1BFC-4040-9DC3-5CC51F9B3C87
> USER=xxx
> SSH_AUTH_SOCK=/tmp/launch-mHzJQr/Listeners
> __CF_USER_TEXT_ENCODING=0x3E2DB485:0:7
> 
> PATH=/Users/xxx/Applications/sbt/bin:/usr/local/bin:/usr/local/pgsql-9.3/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin
> __CHECKFIX1436934=1
> PWD=/Users/xxx/Documents/Courses/ConstraintProgramming_ID2204/examples
> LANG=sv_SE.UTF-8
> SHLVL=1
> HOME=/Users/xxx
> LOGNAME=xxx
> SECURITYSESSIONID=186a4
> _=/usr/bin/env
> 
> $ g++ --version
> Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1
> Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
> Target: x86_64-apple-darwin13.1.0
> Thread model: posix
> 
> $ g++ -O3 -c money.cpp
> money.cpp:38:10: fatal error: 'gecode/driver.hh' file not found
> #include <gecode/driver.hh>
>         ^
> 1 error generated.
> 
> $ clang --version
> Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
> Target: x86_64-apple-darwin13.1.0
> Thread model: posix
> 
> $ clang -O3 -c money.cpp
> money.cpp:1:1: error: expected unqualified-id
> <U+001C>/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
> ^
> money.cpp:38:10: fatal error: 'gecode/driver.hh' file not found
> #include <gecode/driver.hh>
>         ^
> 2 errors generated.
> 
> 
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users




More information about the users mailing list