go编译go-gtk     使用go编译go-gtk,直接编译会出现错误:   pkg-config --cflags -- gdk-2.0 gthread-2.0   pkg-config --libs -- gdk-2.0 gthread-2.0 go build github.com/mattn/go-gtk/gdk: invalid flag in pkg-config --libs: -Wl,-luuid 爬文后,发现这里的讨论,让我顿悟: 修改:C:\msys64\mingw64\…
如图:控制不报错 页面就是报500的错误 查阅了好多资料  都说是Mapper文件写的不对  我仔细找了好几遍也解决不了问题.. 解决: 坑爹的问题害我找了一上午原因,原来是需要在pom.xml文件中配置resource,不然mapper.xml文件就会被漏掉!被漏掉!!被漏掉!!! 在pom.xml中 build节点中添加 <resources> <resource> <directory>src/main/java</directory> <inc…
Go 1.10 Release Notes Introduction to Go 1.10 Changes to the language Ports Tools Default GOROOT & GOTMPDIR Build & Install Test Cgo Doc Fix Get Pprof Vet Diagnostics Gofmt Compiler Toolchain Assembler Gccgo Runtime Performance Garbage Collector C…
2016-01-25更新 上篇文章总结k8s中搭建hbase时,遇到Pod中hostname的DNS解析问题,本篇将通过修改kube2sky源码来解决这个问题. 1 前言 kube2sky在Github上的项目(戳这里)一直在更新,放在DockerHub平台上的镜像滞后较多,有重新构建的必要.虽然新版kube2sky加入了对Pod的DNS解析,域名格式为<pod-ip-address>.<namespace>.pod.<cluster-name>,并不能直接通过host…
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' -o server ./server.go…
在Linux服务器(虚拟机)上使用fdisk添加分区.格式化分区后,遇到了Linux Error: 22: Invalid argument错误,操作步骤如下所示 [root@oracle-server ~]# echo "- - -" > /sys/class/scsi_host/host0/scan [root@oracle-server ~]# fdisk -l   Disk /dev/sda: 584.6 GB, 584646328320 bytes 255 heads,…
在划分磁盘分区时,遇到错误"WARNING: Re-reading the partition table failed with error 22: Invalid argument" 如下所示: [root@DB-Server u02]# fdisk -l   Disk /dev/sda: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders Units = cylinders of 16…
这是我参与8月更文挑战的第5天,活动详情查看:8月更文挑战 系列文章见: [第四天] GDB调试指南:C++中如何调试生产环境的程序? [第三天] IM敏感词算法原理和实现 [第二天] 现代IM架构研究笔记(一):瓜子IM和OpenIM [第一天] Golang中如何正确的使用sarama包操作Kafka? CGO是什么 简单点来讲,如果要调用C++,C写的库(动态库,静态库),那么就需要使用Cgo.其他情况下一般用不到,只需要知道Go能调用C就行了,当然C也可以回调到Go中. 使用Cgo有2种…
1)swift,貌似官网的推荐 2)extern "C" 我使用后者,用起来比较爽,上代码 c.h #pragma once #ifdef __cplusplus extern "C" { #endif void test(); #ifdef __cplusplus } #endif c.c #include "cplus.hpp" #include "c.h" void test() { A *a = new B(); a-…
http://www.myexception.cn/program/679738.html Go调用C代码,Cgo笔记 参考: 官方文档: http://golang.org/cmd/cgo/ http://blog.golang.org/2011/03/c-go-cgo.html 一份博文,编译过程讲得比较细: http://googollee.blog.163.com/blog/static/1159411201031812128593/ Go语言教程:使用C语言函数: http://cha…