ora.v4.a: error adding symbols: Archive has no index; run ranlib to add one
amiracam opened this issue · 4 comments
error :
C:\Users\amira\Documents\GoProjects\TestDBAccess\src\C>gcc -shared -pthread -o testdb.dll dummy.c testdb.a ora.v4.a num.a date.a -lWinMM -lntdll -lWS2_32
ora.v4.a: error adding symbols: Archive has no index; run ranlib to add one
collect2.exe: error: ld returned 1 exit status
I'm using CGO buildmodes for the purposes of generating a C program that integrates our GO libraries that in turn leverage database/sql.
Is this a matter where there are some directives in the oci8.pc file that could be included that would generate the needed index ? btw, running ranlib had no effect.
Not a C guy, new to GO , thank you for your help.
and so besides that , what are the differences between that driver and the rana/ora ? thanks
goracle.v2 is a pure database/sql driver - as with Go 1.9, we no longer need the driver-specific extensions as in ora.v4 (Ses).
The other difference is that goracle.v2 uses ODPI-C, an easier-to-use wrapper for OCI. A side effect is that you no longer need Instant Client for development, only for running, as ODPI loads the libclntsh.so at runtime.
and I can confirm that it works in Windows well. To elaborate we NOT just "using" goracle in a normal GO app context i.e. what we are doing is porting our ProC code to use GO based DB connectivity by using CGO so that we can from our C code call the CGO/database/sql libs instead of Oracle's embedded SQL (ProC) thus allowing us to have DB independence