Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using boost from XCODE 4.6.1 - what are the proper build settings?

I downloaded boost 1.53 and extracted to Users/user/Desktop/boost_1_53_0 I successfully built boost as static libraries following instructions at: http://libcinder.org/docs/v0.8.5/_cinder_boost.html

I changed XCODE's "Build Settings" "Header Search Paths" to /Users/user/Desktop/boost_1_53_0 as well as the "Library Search Paths" to Users/user/Desktop/boost_1_53_0/stage/lib

Then I build and get errors:

The first error I'm getting is "has_binary_operator.hpp" Parse issue Expected member name or ';' after declaration specifiers at the line:

template < typename Lhs, typename Rhs >

struct operator_exists {

...

Does anyone have tips for what the build settings should be? The project contains some files that are cocoa/objective C (.m) and others that are C++(.mm) using boost. I'm completely new to trying to use boost under OSX mountain lion and XCODE 4.6.1.

like image 524
bhartsb Avatar asked Nov 02 '22 21:11

bhartsb


1 Answers

I'm a little late for this one, but in case anybody else has this issue...

I had this problem with boost in projects using Objective C. I would get parse and semantic issues in has_binary_operator.hpp and lexical_cast.hpp.

A quick fix was inserting "#undef check" before including boost headers in Objective C source files, as it would appear "check" is a reserved word in Objective C.

like image 200
Jeff Gregorio Avatar answered Nov 12 '22 19:11

Jeff Gregorio