Conflicting Libraries

T

Thiru

I am writing an application that interacts with Oracle and Teradata.
In order to create the executable, I need to link various Oracle and
Teradata libraries. I found out that when I link the Oracle and
Teradata libraries together, the Teradata API functions are not
working properly. My assumption is that these libraries are sharing
identical function names and parameter lists and hence the conflicts
are causing the problem. Is my assumption a valid one. Could there
be other reasons why Teradata API functions don't work properly when I
link the Oracle libraries. What can one do in such a case?
Thank you very much for any help.
 
C

Christopher Benson-Manica

Thiru said:
I am writing an application that interacts with Oracle and Teradata.
In order to create the executable, I need to link various Oracle and
Teradata libraries. I found out that when I link the Oracle and
Teradata libraries together, the Teradata API functions are not
working properly. My assumption is that these libraries are sharing
identical function names and parameter lists and hence the conflicts
are causing the problem. Is my assumption a valid one. Could there
be other reasons why Teradata API functions don't work properly when I
link the Oracle libraries. What can one do in such a case?

(When in trouble, when in doubt, run in circles, scream and shout!)

Your post is off-topic for comp.lang.c. Please visit

http://www.ungerhu.com/jxh/clc.welcome.txt
http://www.eskimo.com/~scs/C-faq/top.html
http://benpfaff.org/writings/clc/off-topic.html

for posting guidelines and frequently asked questions. Thank you.
 
D

Dan Pop

In said:
I am writing an application that interacts with Oracle and Teradata.
In order to create the executable, I need to link various Oracle and
Teradata libraries. I found out that when I link the Oracle and
Teradata libraries together, the Teradata API functions are not
working properly. My assumption is that these libraries are sharing
identical function names and parameter lists and hence the conflicts
are causing the problem. Is my assumption a valid one. Could there
be other reasons why Teradata API functions don't work properly when I
link the Oracle libraries. What can one do in such a case?

To validate your suspicions, try to change the order of the libraries in
the linking command. If the behaviour of the program changes, then you're
right. If the new behaviour is the intended one, you're also lucky.
If the new behavior is different, but still wrong, you have to complain
to the two vendors, preferably using a minimal program that exposes the
problem.

Dan
 
C

CBFalconer

Christopher said:
(When in trouble, when in doubt, run in circles, scream and shout!)

Your post is off-topic for comp.lang.c. Please visit ....

No it isn't, despite outward appearances. It is a question about
naming things in the standard language.

Unfortunately there is no magic answer in the C world. The best
result would be obtained by revising the Oracle and Teradata
modules to use easily distinguishable names, probably by use of a
suitable prefix. This is probably not available to the OP, who is
left with the option of emitting heated invective about the
library writers while resolving not to use things whose source
code is unavailable.
 
M

Mac

To validate your suspicions, try to change the order of the libraries in
the linking command. If the behaviour of the program changes, then you're
right. If the new behaviour is the intended one, you're also lucky.
If the new behavior is different, but still wrong, you have to complain
to the two vendors, preferably using a minimal program that exposes the
problem.

Dan

Wouldn't there likely be (off-topic) tools to list the symbols in each
library? From there it should be fairly easy to find conflicting symbols,
no?

--Mac
 
D

Dan Pop

In said:
Wouldn't there likely be (off-topic) tools to list the symbols in each
library? From there it should be fairly easy to find conflicting symbols,
no?

Depending on your actual system, my approach may be a far easier way of
demonstrating the existence of conflicting symbols. The typical Unix
linker never complains about conflicting symbols in libraries: the first
encountered definition is used to resolve the symbol and all the others
are ignored. OTOH, comparing the output of nm biglib1 vs the output of
nm biglib2 is not something for the faint of heart.

Things may be different on other systems...

Dan
 
M

Mac

Depending on your actual system, my approach may be a far easier way of
demonstrating the existence of conflicting symbols. The typical Unix
linker never complains about conflicting symbols in libraries: the first
encountered definition is used to resolve the symbol and all the others
are ignored. OTOH, comparing the output of nm biglib1 vs the output of
nm biglib2 is not something for the faint of heart.

Things may be different on other systems...

I don't think I have experience on systems you don't have experience on.
I am probably just underestimating the difficulty of processing the output
of "nm" on two large libraries. I've never done it, but it doesn't SOUND
hard. ;-)


--Mac
 
D

Dan Pop

In said:
I don't think I have experience on systems you don't have experience on.
I am probably just underestimating the difficulty of processing the output
of "nm" on two large libraries. I've never done it, but it doesn't SOUND
hard. ;-)

Then, do it and see whether it's more difficult than inverting the order
of two libraries on the linker invocation.

Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,141
Messages
2,570,817
Members
47,362
Latest member
ChandaWagn

Latest Threads

Top