【发布时间】:2011-04-29 01:03:49
【问题描述】:
我正在尝试在 Mac OS X 上的 Qt Creator 项目中使用 ChangeWindowAttributes() 函数。 但我无法构建项目。
我尝试过的:
#include <MacWindows.h>
结果(编译器):找不到文件
#include <Carbon/Carbon.h>
// Or the same:
#include </Developer/Headers/FlatCarbon/MacWindows.h>
结果(编译器):ChangeWindowAttributes 未在此范围内声明
#include <Carbon/Carbon.h>
extern OSStatus ChangeWindowAttributes (
WindowRef window,
WindowAttributes setTheseAttributes,
WindowAttributes clearTheseAttributes
);
// And in *.pro file:
LIBS += -framework Carbon
结果(链接器):未定义符号 ChangeWindowAttributes( ...
我哪里错了?
根据谷歌,似乎每个人都已经知道如何包含它,所以任何地方都没有指南。也许这里有人也有指南的链接或其他什么?
【问题讨论】:
-
尝试使用 " 而不是