我在 mac 中开发了一个使用 carbon 的应用程序。
我的 IDE 是 Code::Blocks(GCC 编译器)。我的代码编译成功但没有链接。
#include <iostream>
#include <Carbon/Carbon.h>
using namespace std;
int main()
{
//CGEventFlags flags = CGEventSourceFlagsState(1);
while(true)
{
CGEventSourceStateID eventSource = kCGEventSourceStateCombinedSessionState;
bool b = CGEventSourceKeyState(eventSource, kVK_Command) && CGEventSourceKeyState(eventSource, kVK_ANSI_Period);
if(b)
{
cout << "Yes" << endl;
}
else
{
cout << "No" << endl;
}
}
cout << "Hello world!" << endl;
return 0;
}
如何在 mac 中使用 gcc 链接到 carbon?
最佳答案
关于c++ - 如何在 mac 中使用 gcc 链接到 carbon?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7454497/