You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by cecchinoSMI <ma...@gmail.com> on 2014/02/10 12:27:52 UTC

Ambiguous class names

Hi to all,
I'm trying  to design GUI applications with VisualStudio2012 to test my
Producer and Consumer  activeMq CMS libraries.
To explain my problem I attached, some pictures and code.
I'm using:
-ActiveMq cpp library 3.8.1
-Apache ActiveMq 5.8.0
-Visual Studio 2012

this is a part of the code of the window form (GUIClient.h):
<http://activemq.2283324.n4.nabble.com/file/n4677683/form.jpg> 
System is ambiguous


the same think accours for the header file functionsGUI.h:
<http://activemq.2283324.n4.nabble.com/file/n4677683/function.jpg> 
Message is ambiguous


To use the Windows Form Application I choosen in my project properties:
<http://activemq.2283324.n4.nabble.com/file/n4677683/subsystem.jpg> 


So...there is a possibility to solve this problem of ambiguity between cms
libraries and windows libraries?









--
View this message in context: http://activemq.2283324.n4.nabble.com/Ambiguous-class-names-tp4677683.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Ambiguous class names

Posted by artnaseef <ar...@artnaseef.com>.
For those names which the compiler complains are ambiguous, try the full
class name.  If the name is in the toplevel namespace, try prefixing it
with "::".

I suspect the problem is overlapping names in the imported namespaces.

>
>
> On 02/10/2014 09:11 AM, cecchinoSMI wrote:
>> But...I say...why you call a file System.h in the folder cms::decaf when
>> you
>> well know that exist the same in the folder of windows....I'm locked
>> cause
>> now I can't use Windows Form in Visual C++ with cms libraries
>>
>>
>>
>> --
>> View this message in context:
>> http://activemq.2283324.n4.nabble.com/Ambiguous-class-names-tp4677683p4677692.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
> There are plenty of people using CMS from Windows without issue, I'd
> take a look at your include structure, using directives, and such. The
> System class exists inside it's own namespace decaf::lang::System so
> with good coding practices there should be no issue here.
>
> --
> Tim Bish
> Sr Software Engineer | RedHat Inc.
> tim.bish@redhat.com | www.fusesource.com | www.redhat.com
> skype: tabish121 | twitter: @tabish121
> blog: http://timbish.blogspot.com/
>
>
>
>
>
> _______________________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://activemq.2283324.n4.nabble.com/Ambiguous-class-names-tp4677683p4677693.html
> To start a new topic under ActiveMQ - User, email
> ml-node+s2283324n2341805h3@n4.nabble.com
> To unsubscribe from ActiveMQ - User, visit
> http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2341805&code=YXJ0QGFydG5hc2VlZi5jb218MjM0MTgwNXwtMjA1NDcyNjY5MQ==






--
View this message in context: http://activemq.2283324.n4.nabble.com/Ambiguous-class-names-tp4677683p4677736.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Ambiguous class names

Posted by Timothy Bish <ta...@gmail.com>.
On 02/10/2014 09:11 AM, cecchinoSMI wrote:
> But...I say...why you call a file System.h in the folder cms::decaf when you
> well know that exist the same in the folder of windows....I'm locked cause
> now I can't use Windows Form in Visual C++ with cms libraries
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Ambiguous-class-names-tp4677683p4677692.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
There are plenty of people using CMS from Windows without issue, I'd 
take a look at your include structure, using directives, and such. The 
System class exists inside it's own namespace decaf::lang::System so 
with good coding practices there should be no issue here.

-- 
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.fusesource.com | www.redhat.com
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/


Re: Ambiguous class names

Posted by artnaseef <ar...@artnaseef.com>.
For the name of the header file, I recommend using -I on the ancestor
directory and #include "cms/decaf/System.h" - that will prevent any
possibility of conflict with O/S (or other library) headers named System.h.




--
View this message in context: http://activemq.2283324.n4.nabble.com/Ambiguous-class-names-tp4677683p4677741.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Ambiguous class names

Posted by cecchinoSMI <ma...@gmail.com>.
But...I say...why you call a file System.h in the folder cms::decaf when you
well know that exist the same in the folder of windows....I'm locked cause
now I can't use Windows Form in Visual C++ with cms libraries



--
View this message in context: http://activemq.2283324.n4.nabble.com/Ambiguous-class-names-tp4677683p4677692.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Ambiguous class names

Posted by cecchinoSMI <ma...@gmail.com>.
If I don't use the namespace, I need to include manually all the header file
that are necessary to implement my class....it is not very elegant...



--
View this message in context: http://activemq.2283324.n4.nabble.com/Ambiguous-class-names-tp4677683p4677691.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Ambiguous class names

Posted by Timothy Bish <ta...@gmail.com>.
On 02/10/2014 06:27 AM, cecchinoSMI wrote:
> Hi to all,
> I'm trying  to design GUI applications with VisualStudio2012 to test my
> Producer and Consumer  activeMq CMS libraries.
> To explain my problem I attached, some pictures and code.
> I'm using:
> -ActiveMq cpp library 3.8.1
> -Apache ActiveMq 5.8.0
> -Visual Studio 2012
>
> this is a part of the code of the window form (GUIClient.h):
> <http://activemq.2283324.n4.nabble.com/file/n4677683/form.jpg>
> System is ambiguous
>
>
> the same think accours for the header file functionsGUI.h:
> <http://activemq.2283324.n4.nabble.com/file/n4677683/function.jpg>
> Message is ambiguous
>
>
> To use the Windows Form Application I choosen in my project properties:
> <http://activemq.2283324.n4.nabble.com/file/n4677683/subsystem.jpg>
>
>
> So...there is a possibility to solve this problem of ambiguity between cms
> libraries and windows libraries?
>
>
>
>
>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Ambiguous-class-names-tp4677683.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
Don't use using statements in class definitions, it's evil.

-- 
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.fusesource.com | www.redhat.com
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/