Visibroker 6 causing "member function already defined or declared" error

Hello ,

I am currently trying to build my project using Visbroker 6.0 but keep receiving the following error.

d:\6.0\include\viostrm.h(85) : error C2535: 'class VISistream &__thiscall VISistream::operator >>(unsigned short &)' : member function already defined or declared
        d:\6.0\include\viostrm.h(67) : see declaration of '>>'
d:\6.0\include\viostrm.h(112) : error C2535: 'class VISistream &__thiscall VISistream::get(unsigned short *,unsigned int)' : member function already defined or declared
        d:\6.0\include\viostrm.h(106) : see declaration of 'get'
d:\6.0\include\viostrm.h(194) : error C2535: 'class VISostream &__thiscall VISostream::operator <<(unsigned short)' : member function already defined or declared
        d:\6.0\include\viostrm.h(175) : see declaration of '<<'
d:\6.0\include\viostrm.h(218) : error C2535: 'class VISostream &__thiscall VISostream::put(const unsigned short *,unsigned int)' : member function already defined or declared
        d:\6.0\include\viostrm.h(212) : see declaration of 'put'

Etc...

I have this project build and running using Visibroker 5.1 and it all works fine in the very same envirnoment.

The 'idl' files for the 5.1 project were build using 5.1 and the same 'idl' files for the 6.0 project were built using 6.0.

I have an idea that my problem lies in that wchar_t is a typedef for unsigned short in VC++ 6, but if this were true i should have had problems when building the 5.1 project.

Does anyone have any solution to my problem ..

This is the piece of code to which the firts error refers too ...

#if defined(_VIS_UNICODE)
#if defined(_VIS_STREAM_WCHAR)
    virtual VISistream& operator>>(wchar_t& x);
#else
    virtual VISistream& operator>>(VISWChar& x);
#endif
    virtual VISistream& operator>>(wchar_t *& c);
    // get_wstring in mbuf only for now!!
    //virtual VISistream& get_wstring(wchar_t *& c);
#endif
oddbinAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

cupCommented:
Looks like it is moaning about inline definitions in the header files.  

Also, just to be safe, make sure that the 5.1 headers are not in the include list in the tools options directories.  It may be mixing those up with your V6 headers.

Also, be warned that if you are using Unicode, TCHAR is 16 bits on Windows but 32 bits on many of the *nixs.
0
oddbinAuthor Commented:
From the borland website : http://info.borland.com/devsupport/bes/relnotes/6_0_preview/VBE60_Beta.html#VBC_FixList


Wide Char on Windows - Prior to MSVC7, wchar_t was not considered as a built-in type and was mapped to "unsigned short",
hence wrappers were created to differentiate "unsigned short" and wchar_t data.However in MSVC7 wchar_t is now corrected and is now considered a built-in type and this compliancy can be enabled by using the "/Zc:wchar_t" MSVC7 compilation switch. This switch is required for wchar_t compliancy as suggested by Microsoft.

In Summary , insert "/Zc:wchar_t" into the preprocessor defs in the C++ Project settings tab.
0
tinchosCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

PAQ with points refunded

Please leave any comments here within the next four days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Tinchos
EE Cleanup Volunteer
0
amp072397Commented:
PAQed, with points refunded (100)

amp
Community Support Cleanup Moderator
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.