使用XCODE 4.6.1中的boost - 什么是正确的构建设置? [英] Using boost from XCODE 4.6.1 - what are the proper build settings?

查看:181
本文介绍了使用XCODE 4.6.1中的boost - 什么是正确的构建设置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我下载了boost 1.53并解压到Users / user / Desktop / boost_1_53_0
我按照以下指示成功构建了boost作为静态库: http://libcinder.org/docs/v0.8.5/_cinder_boost.html

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

我更改了XCODE的Build SettingsHeader Search Pathsto / Users / user / Desktop / boost_1_53_0以及Library Search Pathsto users / user / Desktop / boost_1_53_0 / stage / lib

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:

我得到的第一个错误是has_binary_operator.hpp解析问题预期成员名称或'说明符的行:

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>

template < typename Lhs, typename Rhs >

struct operator_exists {

struct operator_exists {

...

有没有人有提示为什么构建设置应该是?该项目包含一些文件是可可/目标C(.m)和其他是C + +(。毫米)使用boost。我完全是新尝试在OSX山狮和XCODE 4.6.1下使用boost。

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.

推荐答案

我在使用Objective C的项目中遇到这个问题。我会得到解析和语义问题在had_binary_operator.hpp和lexical_cast.hpp。

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.

一个快速修复是在Objective C源文件中包含boost标头之前插入#undef check,因为check是Objective C中的保留字。

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.

这篇关于使用XCODE 4.6.1中的boost - 什么是正确的构建设置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆