__LP64__在OSX 10.6上为C ++应用程序的默认构建定义了哪里? [英] Where is __LP64__ defined for default builds of C++ applications on OSX 10.6?

查看:1246
本文介绍了__LP64__在OSX 10.6上为C ++应用程序的默认构建定义了哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在OSX 10.6上建立一个32位模式的第三方库(库是Xerces 2.8)。我已经确定预处理器定义 __ LP64 __ 已设置。但是,据我所知,它不是在第三方项目的任何配置文件中设置,并且通过所有文件(通过Finder)对 #define __LP64 __ 不会向我显示系统正在定义的位置。

I am building a 3rd-party library in 32-bit mode on OSX 10.6 (the library is Xerces 2.8). I have determined that the preprocessor definition __LP64__ is set. However, as far as I can see it is not being set within any configuration files of the 3rd-party project, and doing a global search through all files (via the Finder) for #define __LP64__ does not reveal to me where this is being defined by the system.

我通过 make 在命令行(Xcode不涉及)。

I am building the library via make at the command line (Xcode is not involved).

我想知道 __ LP64 __ 是在哪里定义的 - 其目的是什么,项目在32位模式。

I would like to know where __LP64__ is defined - and what its purpose is, given that I am building the project in 32-bit mode.

推荐答案

它是由编译器自动定义,而不是在任何标题。如果已设置,您正在构建64位目标。

It's defined automatically by the compiler rather than in any header. If it's set, you're building for 64-bit targets.

(如果编译器尚未定义,可以如果你认为是这种情况,添加 #define __LP64 __ 到你的代码,并查看预处理期间的错误,以确定上一个define的位置。)

(A header could define it if the compiler hasn't already, though it shouldn't. If you think this is the case, add #define __LP64__ to your code, and look at the error during preprocessing to determine the location of the previous define.)

这篇关于__LP64__在OSX 10.6上为C ++应用程序的默认构建定义了哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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