mattn / go-oci8

Oracle driver for Go using database/sql
https://mattn.kaoriya.net/
MIT License
630 stars 212 forks source link

driver Update - Oracle 18.5 #335

Closed thigaz closed 5 years ago

thigaz commented 5 years ago

I was getting the infamed error:

C:\Go\pkg\tool\windows_amd64\link.exe: running gcc failed: exit status 1
C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -loci
collect2.exe: error: ld returned 1 exit status

And since I couldn't find the problem with my oci8.pc, I tried updating the driver, but then I got the following error:

C:/Oracle/18.0.0/dbhomeXE/oci/lib/msvc/oci.lib: error adding symbols: File in wrong format
collect2.exe: error: ld returned 1 exit status

I then downloaded the latest instantclient (18.5) but got the same error.

Is the driver incompatible with the Oracle 18+?

MichaelS11 commented 5 years ago

I have tested it with 12.2 and 11.2 and know those version will work. I gather from other people's posts that it works with the newer versions of instantclient. One of the post was for 18.3.

thigaz commented 5 years ago

For anyone having this problem, I solved both problems by downloading instantclient 18.5 and SDK and going back to x86_64-w64-mingw32... The file in wrong format was an issue of TDM-GCC-64.

@MichaelS11, this can be closed. Thank you for your response!

MichaelS11 commented 5 years ago

@thigaz Glad you got it fixed, thanks for letting us know! Please close this issue.