致命错误:oci.h:没有这样的文件或目录

时间:2017-09-01 11:58:11

标签: oracle go oci instantclient

go go go.8.1.1 windows / amd64 当我试着去获取oracle库

go get -v gopkg.in/rana/ora.v4
output: 
**gopkg.in/rana/ora.v4
# gopkg.in/rana/ora.v4
F:\CODING\src\gopkg.in\rana\ora.v4\bndBfile.go:9:10: fatal error: oci.h: No such file or directory
 #include <oci.h>
          ^~~~~~~
compilation terminated.**

**go get github.com/mattn/go-oci8
# github.com/mattn/go-oci8
F:\CODING\src\github.com\mattn\go-oci8\oci8.go:4:10: fatal error: oci.h: No such file or directory
 #include <oci.h>
          ^~~~~~~
compilation terminated.**

现在当我输入pkg-config --cflags --libs oci8时 我得到以下结果,这意味着oci8.pc工作正常

-IC:instantclient_12_2sdkinclude -IC:mingw64include  -LC:instantclient_12_2sdklibmsvc -LC:mingw64lib -loci

请说明哪里出错了 oci8.pc

prefix=/devel/target/1.0
exec_prefix=${prefix}
oralib=C:\instantclient_12_2\sdk\lib\msvc
orainclude=C:\instantclient_12_2\sdk\include
gcclib=C:\mingw64\lib
gccinclude=C:\mingw64\include
glib_genmarshal=glib-genmarshal
gobject_query=gobject-query
glib_mkenums=glib-mkenums

Name: oci8
Version: 12.2
Description: oci8 library
Libs: -L${oralib} -L${gcclib} -loci
Libs.private: 
Cflags: -I${orainclude} -I${gccinclude}

0 个答案:

没有答案