Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ora.v4.a: error adding symbols: Archive has no index; run ranlib to add one #220

Open
amiracam opened this issue Sep 14, 2017 · 4 comments

Comments

@amiracam
Copy link

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.

@tgulacsi
Copy link
Collaborator

tgulacsi commented Sep 14, 2017 via email

@amiracam
Copy link
Author

and so besides that , what are the differences between that driver and the rana/ora ? thanks

@tgulacsi
Copy link
Collaborator

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.

@amiracam
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants