sublime--sublimeclan安装记(windows)
凌乱的一些小心得。
第一步在win7上安装clang,参考 http://clang.llvm.org/get_started.html 上的步骤,很繁琐的。。安装完了,要在path里面设置clang.exe的目录,最好把VS的link.exe拷贝到同一个目录下,因为clang编译出来时不带linker的。
第二步,安装sublimeclang,按照 https://github.com/quarnster/SublimeClang的步骤安装。
第三步,配置sublimeclang. 这里有几个问题:
在SublimeClang/SublimeClang.sublime-settings里,clang的option有一些linux的东西,要把他们去掉,
// Set "debug_options" (defined below) to true to print the final options used for compilation to the python console
"options":
[
- "-Wall",
- "-I/usr/lib/gcc/i686-apple-darwin10/4.2.1/include/",
- "-I/usr/lib/gcc/i686-apple-darwin11/4.2.1/include/",
+ "-Wall"
+ //"-I/usr/lib/gcc/i686-apple-darwin10/4.2.1/include/",
+ //"-I/usr/lib/gcc/i686-apple-darwin11/4.2.1/include/",
// If you code for iOS, you want to have something like the following here:
//"-isysroot",
//"/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk",
//"-D__IPHONE_OS_VERSION_MIN_REQUIRED=40300",
- "-IC:/MinGW/include",
- "-I/path/to/sources/1",
- "-I/path/to/sources/2"
+ //"-IC:/MinGW/include",
+ //"-I/path/to/sources/1",
+ //"-I/path/to/sources/2"
],
"options":
[
- "-Wall",
- "-I/usr/lib/gcc/i686-apple-darwin10/4.2.1/include/",
- "-I/usr/lib/gcc/i686-apple-darwin11/4.2.1/include/",
+ "-Wall"
+ //"-I/usr/lib/gcc/i686-apple-darwin10/4.2.1/include/",
+ //"-I/usr/lib/gcc/i686-apple-darwin11/4.2.1/include/",
// If you code for iOS, you want to have something like the following here:
//"-isysroot",
//"/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk",
//"-D__IPHONE_OS_VERSION_MIN_REQUIRED=40300",
- "-IC:/MinGW/include",
- "-I/path/to/sources/1",
- "-I/path/to/sources/2"
+ //"-IC:/MinGW/include",
+ //"-I/path/to/sources/1",
+ //"-I/path/to/sources/2"
],
还有可以打开debug_options
// When set to true will output the final options used to the python console
- "debug_options": false,
+ "debug_options": true,
- "debug_options": false,
+ "debug_options": true,
然后可以加上一些Windows include 目录在sublime-settings,这样就是全局了。
也可以在project settings里面加,比如这样
{
"folders":
[
{
"path": "/C/EverBox/gitCode/clangxx"
}
],
"settings": {
"sublimeclang_options": [
"-Wall",
"-IC:\\EverBox\\gitCode\\clangxx\\inc"
]
}
}
"folders":
[
{
"path": "/C/EverBox/gitCode/clangxx"
}
],
"settings": {
"sublimeclang_options": [
"-Wall",
"-IC:\\EverBox\\gitCode\\clangxx\\inc"
]
}
}
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· .NET周刊【3月第1期 2025-03-02】
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!
· [AI/GPT/综述] AI Agent的设计模式综述
2011-09-07 使用Process Monitor来得到程序运行参数
2011-09-07 使用Windbg知道程序运行时的命令行参数.
2010-09-07 [C++]Call virtual member function in constructor or destructor