0

Hi,

Problem:
I have two libraries with two different queue implementations. but with same structure name as "queuetype".

Now if I include both of the header files in my code, compilation will go for toss saying "error: conflicting types for 'queuetype' "

I need to include both the files.

How can I resolve this issue??

Thanks in advance.

3
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by Narue
0

I have two libraries with two different queue implementations. but with same structure name as "queuetype".

Question - are the structures queuetype the same in both files(besides the name)?

0

>How can I resolve this issue??
If you have control over the source for either library, simply change the name. If you don't have control, that's what I'd call a namespace nightmare. ;)

One way to work around it is by using a wrapper library. The purpose of a wrapper library is to provide exactly the same functionality, with names changed to protect the guilty. All types and functions defer to the wrapped library, so they're nothing more than a slight abstraction to resolve name conflicts.

Are these libraries statically linked or dynamically linked?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.