如何在mac中使用gcc连接碳
How to link to the carbon with gcc in mac?
我在mac中开发了一个使用碳的应用程序。
我的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链接到碳?
根据互联网上的各种来源,gcc的一个简单的-framework Carbon
标志应该可以做到这一点。
无法验证。
这个问题看起来有点类似。
相关文章:
- CMake项目Boost库错误:Boost/config/compiler/gcc.hpp:165:10:致命错误:cs
- 奇怪的结构&GCC&clang(void*返回类型)
- 当套接字连接断开时检测C/C++Unix
- GCC本机矩阵运算库
- PowerPC ppc64le上的Gcc Woverloaded虚拟错误
- gcc和c++17的过载解析失败
- 数据成员SFINAE的C++17测试:gcc vs clang
- GCC对可能有效的代码抛出init list生存期警告
- 如何解决gcc编译器优化导致的centos双编译器设置中的分段错误
- 使用 GCC 卸载的 OpenMP 卸载失败,并出现"Ptx assembly aborted due to errors"
- 为什么与常规GCC不同,即使有"学究性错误",MinGW-GCC也能容忍丢失的返回类型
- 使用gcc从静态链接的文件中查找可选符号
- 使用 arm-none-eabi-gcc、newlib 和 cmake 连接 C/C++ STM32 项目
- GCC 中的库连接
- CV :: OpenCV 3.2.0中的连接contectedComponentswithStats有时以GCC 6.2
- GCC如何连接多个c++ std::string变量
- c++宏连接在gcc下不能工作
- 如何在mac中使用gcc连接碳
- c++ #定义和连接大小写(我使用gcc)
- 需要连接std:string + WCHAR移动gcc代码到Visual c++ 2010