dsjlqkbpn029473708 2016-01-25 23:58
浏览 506

Golang OCI8:错误添加符号:文件格式错误

I am trying to connect to an Oracle database in Go using this package. I have both server and instantclient installed for both Oracle 11.2 and 12.1, and I'm following the instructions regarding the oci8.pc file. My operating system is Windows.

However, when I run "go get github.com/mattn/go-oci8" (or attempt to install a program that uses the package after having gotten the package's source code directly) I get this error:

# github.com/mattn/go-oci8
C:/oraclexe/app/oracle/product/11.2.0/server/oci/lib/MSVC/oci.lib: error adding symbols: File in wrong format
collect2.exe: error: ld returned 1 exit status

Does anyone know what the problem is and how to fix it?

  • 写回答

1条回答 默认 最新

  • doujie7497 2017-05-14 13:58
    关注

    Looks to be the same issue I had trying to install oci8. Are you using TDM_GCC? The problem for me was that TDM_GCC has a compiler / linker bug that prevents from compiling certain files. I used ming64 instead and it worked. You can see my detailed posts regarding that here:

    https://github.com/mattn/go-oci8/issues/75

    评论

报告相同问题?

悬赏问题

  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
  • ¥15 教务系统账号被盗号如何追溯设备
  • ¥20 delta降尺度方法,未来数据怎么降尺度
  • ¥15 c# 使用NPOI快速将datatable数据导入excel中指定sheet,要求快速高效
  • ¥15 再不同版本的系统上,TCP传输速度不一致
  • ¥15 高德地图2.0 版本点聚合中Marker的位置无法实时更新,如何解决呢?
  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题