Board index » cppbuilder » Class Name Property Name conflict!

Class Name Property Name conflict!

Hello,
    I have one Class that is from the mysql++ API MysqlConnection aliased as
Connection, there is also a Component from INDY that I am using that uses
TIdPeerThread which has in it a property name Connection of type
TIdTCPServerConnection Now when I try to compile the program i get the error
that MysqlConnection is not a member of TIdPeerThread
if i switch the order of the header files so that the sqlplus.hh (header for
mysql++) and have it before the INDY headers it doesn't give the error but
it causes problems with the SQL connections is there a way to fix this?
Thanks in Advance
Michael
 

Re:Class Name Property Name conflict!


Quote
Michael Morris wrote:

> Hello,
>     I have one Class that is from the mysql++ API MysqlConnection aliased as
> Connection, there is also a Component from INDY that I am using that uses
> TIdPeerThread which has in it a property name Connection of type
> TIdTCPServerConnection Now when I try to compile the program i get the error
> that MysqlConnection is not a member of TIdPeerThread
> if i switch the order of the header files so that the sqlplus.hh (header for
> mysql++) and have it before the INDY headers it doesn't give the error but
> it causes problems with the SQL connections is there a way to fix this?

I am not quite sure but you might try the following. I have never tried
it myself so...

If you have an object of type TIdPeerThread called peerthread and want
to access its
Connection property you could try the following.

peerthread->TIdPeerThread::Connection

The idea is to give the fully qualified name but I do not know if it is
allowed. Could you let me know if it works?

Regards,
Eelke

Re:Class Name Property Name conflict!


Eelke,
    Thanks for the help but unfortunately it did not work
Michael
Quote
"Eelke Klein" <eelke_kl...@yahoo.com> wrote in message

news:3ACAD029.ECF6FC65@yahoo.com...
Quote
> Michael Morris wrote:

> > Hello,
> >     I have one Class that is from the mysql++ API MysqlConnection
aliased as
> > Connection, there is also a Component from INDY that I am using that
uses
> > TIdPeerThread which has in it a property name Connection of type
> > TIdTCPServerConnection Now when I try to compile the program i get the
error
> > that MysqlConnection is not a member of TIdPeerThread
> > if i switch the order of the header files so that the sqlplus.hh (header
for
> > mysql++) and have it before the INDY headers it doesn't give the error
but
> > it causes problems with the SQL connections is there a way to fix this?

> I am not quite sure but you might try the following. I have never tried
> it myself so...

> If you have an object of type TIdPeerThread called peerthread and want
> to access its
> Connection property you could try the following.

> peerthread->TIdPeerThread::Connection

> The idea is to give the fully qualified name but I do not know if it is
> allowed. Could you let me know if it works?

> Regards,
> Eelke

Re:Class Name Property Name conflict!


Quote
Michael Morris wrote:

> Eelke,
>     Thanks for the help but unfortunately it did not work

Could you write some minimal code which generates the problem.

I tried to reconstruct the situation but I didn't get errors.

Regards,
Eelke

Other Threads