clang

go 升级到1.16

假装没事ソ 提交于 2021-02-20 19:50:23
golang 多个版本管理 下载页面 多个版本管理 1.下载go1.16 ➜ bin pwd /Users/xxxx/go-dev/bin ➜ bin go get golang.org/dl/go1.15.8 go: finding golang.org/dl latest ➜ bin ll total 28816 -rwxr-xr-x 1 xxxxx staff 7.0M 2 20 18:33 go1.15.8 -rwxr-xr-x 1 xxxxx staff 7.0M 2 20 18:31 go1.16 确保可执行路径已经添加到PATH中. # go export GOPATH="${HOME}/go-dev" # GOROOT是GO的安装路径 export GOROOT="$(brew --prefix golang)/libexec" export PATH="$PATH:${GOPATH}/bin:${GOROOT}/bin" 新开终端/或者重新激活一下zshrc 2.下载go1.16 同时配置go1.16 env GOROOT ➜ ~ go1.16 go1.16: not downloaded. Run 'go1.16 download' to install to /Users/xxxxxx/sdk/go1.16 ➜ ~ go1.16 download ➜ ~

干货回顾 | 快速上手 VS Code:开发环境搭建和常用插件配置

强颜欢笑 提交于 2021-02-19 12:11:30
关注精彩内容,先点击 蓝字 关注我哦~ VS Code 中文社区简介: VS Code 中文成立于2019年11月30日,社区致力于促进开发者之间的交流学习。定期举办线上与线下的沙龙、动手实践营以及开发者交流大会等。 快速上手 VS Code:开发环境搭建和常用插件配置 时间:10月30日(周五) 19:30-21:30 主讲嘉宾介绍 张迪,中国科技大学,机器人实验室自然语言处理和机器人定位导航方向研究生。 分享大纲 一、快速搭建编译环境 二、包管理器的对比选择(Windows) scoop Windows Package manager chocolate 三、面向数据科学的Python环境搭建 Python开发常用插件和配置 四、Windows下CPP环境无痛搭建 gcc llvm/clang vcpkg 常用插件和配置 五、Git相关常用插件和配置 六、让你的Code更出彩:常用插件和配置 七、码字更智能:主流智能补全插件对比(AI-powerd autocompletion) 原配夫人intellicode 国产Aixcoder Tabnine Kite 八、让你的开发更舒适 九、让你的界面更美 十、让你摸鱼更快乐 开发环境的搭建 本次讲座主要面向入门者。 对于 Windows ,搭建环境可能并不如 Linux 方便。张老师提到了 Windows 上的 3 个包管理器:

干货回顾 | 快速上手 VS Code:开发环境搭建和常用插件配置

纵饮孤独 提交于 2021-02-19 11:49:51
关注精彩内容,先点击 蓝字 关注我哦~ VS Code 中文社区简介: VS Code 中文成立于2019年11月30日,社区致力于促进开发者之间的交流学习。定期举办线上与线下的沙龙、动手实践营以及开发者交流大会等。 快速上手 VS Code:开发环境搭建和常用插件配置 时间:10月30日(周五) 19:30-21:30 主讲嘉宾介绍 张迪,中国科技大学,机器人实验室自然语言处理和机器人定位导航方向研究生。 分享大纲 一、快速搭建编译环境 二、包管理器的对比选择(Windows) scoop Windows Package manager chocolate 三、面向数据科学的Python环境搭建 Python开发常用插件和配置 四、Windows下CPP环境无痛搭建 gcc llvm/clang vcpkg 常用插件和配置 五、Git相关常用插件和配置 六、让你的Code更出彩:常用插件和配置 七、码字更智能:主流智能补全插件对比(AI-powerd autocompletion) 原配夫人intellicode 国产Aixcoder Tabnine Kite 八、让你的开发更舒适 九、让你的界面更美 十、让你摸鱼更快乐 开发环境的搭建 本次讲座主要面向入门者。 对于 Windows ,搭建环境可能并不如 Linux 方便。张老师提到了 Windows 上的 3 个包管理器:

opencv compile with clang ok, with gcc not ok os x 10.9

夙愿已清 提交于 2021-02-17 02:06:44
问题 I am on OS X 10.9, with opencv-2.4.8.2 installed. I am trying to compile a simple code: #include <stdio.h> #include <opencv2/opencv.hpp> using namespace cv; int main(int argc, char** argv ) { if ( argc != 2 ) { printf("usage: DisplayImage.out <Image_Path>\n"); return -1; } Mat image; image = imread( argv[1], 1 ); if ( !image.data ) { printf("No image data \n"); return -1; } namedWindow("Display Image", WINDOW_AUTOSIZE ); imshow("Display Image", image); waitKey(0); return 0; } and can do that

opencv compile with clang ok, with gcc not ok os x 10.9

一曲冷凌霜 提交于 2021-02-17 02:06:42
问题 I am on OS X 10.9, with opencv-2.4.8.2 installed. I am trying to compile a simple code: #include <stdio.h> #include <opencv2/opencv.hpp> using namespace cv; int main(int argc, char** argv ) { if ( argc != 2 ) { printf("usage: DisplayImage.out <Image_Path>\n"); return -1; } Mat image; image = imread( argv[1], 1 ); if ( !image.data ) { printf("No image data \n"); return -1; } namedWindow("Display Image", WINDOW_AUTOSIZE ); imshow("Display Image", image); waitKey(0); return 0; } and can do that

What should I fix when Address Sanitizer says detect_leaks is not supported on this platform?

我与影子孤独终老i 提交于 2021-02-16 20:32:22
问题 I'm using Clang to compile my project, on x86_64 OS X(MacOS 10.15.5 Catalina). I want to identify exactly from which file, which function, which line causes memory leaks. I am trying to use Address Sanitizer, specifically Leak Sanitizer. Here are flags that I'm using when compiling: -Wall -Wextra -flto -O3 -march=native -ffast-math -fsanitize=address It successfully compiles. However, when I try to use run-time flag ASAN_OPTIONS=detect_leaks=1 in order to enable Leak Sanitizer, I see the

What should I fix when Address Sanitizer says detect_leaks is not supported on this platform?

梦想的初衷 提交于 2021-02-16 20:32:05
问题 I'm using Clang to compile my project, on x86_64 OS X(MacOS 10.15.5 Catalina). I want to identify exactly from which file, which function, which line causes memory leaks. I am trying to use Address Sanitizer, specifically Leak Sanitizer. Here are flags that I'm using when compiling: -Wall -Wextra -flto -O3 -march=native -ffast-math -fsanitize=address It successfully compiles. However, when I try to use run-time flag ASAN_OPTIONS=detect_leaks=1 in order to enable Leak Sanitizer, I see the

no matching constructor for initialization of 'string' (aka 'basic_string<char>')

浪尽此生 提交于 2021-02-16 20:31:18
问题 Here is the code: #include <iostream> #include <string> using namespace std; class Foo { public: operator string() const { return n; } string n {"foo"}; }; int main (int argc, char** argv) { string s {Foo{}}; cout << s << endl; return 0; } This code compiles using gcc 4.8.3, but it does not compile using clang 3.5, can someone tell me what's wrong with it? I got an error like this: main.cpp:45:12: error: no matching constructor for initialization of 'string' (aka 'basic_string<char>') string

Why does the following code compile using clang but not gcc

这一生的挚爱 提交于 2021-02-16 18:24:47
问题 #include <iostream> #include <unordered_map> #include <string> struct tree_node { // tree_node() : attrib_val{"null"} {} std::unordered_map<std::string, tree_node> child; }; int main(int argc, char const *argv[]) { return 0; } This code compiles just fine on my mac with clang: $ g++ --version Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1 Apple LLVM version 10.0.1 (clang

Why does the following code compile using clang but not gcc

点点圈 提交于 2021-02-16 18:24:25
问题 #include <iostream> #include <unordered_map> #include <string> struct tree_node { // tree_node() : attrib_val{"null"} {} std::unordered_map<std::string, tree_node> child; }; int main(int argc, char const *argv[]) { return 0; } This code compiles just fine on my mac with clang: $ g++ --version Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1 Apple LLVM version 10.0.1 (clang