Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...Thanks! Awesome group. I put out a simple question in the access/vba forum that I couldn't find answered on technet or anywhere else on the web and it was answered the same day!!..."

Geography

Where in the world do Tek-Tips members come from?

RAD i think it's winsock problem.I'm stuck(it's been a few days)

esmet (Programmer)
25 Jul 11 6:50
[BCC32 Error] Winsock.hpp(23): E2257 , expected
[BCC32 Error] Winsock.hpp(30): E2257 , expected
[BCC32 Error] Winsock.hpp(34): E2257 , expected
[BCC32 Error] Winsock.hpp(38): E2257 , expected
[BCC32 Error] Winsock.hpp(42): E2257 , expected
[BCC32 Error] Winsock.hpp(46): E2257 , expected
[BCC32 Error] Winsock.hpp(50): E2257 , expected
[BCC32 Error] Winsock.hpp(54): E2257 , expected
[BCC32 Error] Winsock.hpp(58): E2257 , expected
[BCC32 Error] Winsock.hpp(62): E2257 , expected
[BCC32 Error] Winsock.hpp(66): E2257 , expected
[BCC32 Error] functional(838): E2238 Multiple declaration for 'operator hash<wstring>::()(const wstring &) const'
[BCC32 Error] functional(794): E2344 Earlier declaration of 'operator hash<wstring>::()(const wstring &) const'
[BCC32 Error] winsock2.h(138): E2015 Ambiguity between 'fd_set' and 'Winsock::fd_set'
[BCC32 Error] winsock2.h(1918): E2015 Ambiguity between 'fd_set' and 'Winsock::fd_set'
[BCC32 Error] winsock2.h(1919): E2015 Ambiguity between 'fd_set' and 'Winsock::fd_set'
[BCC32 Error] winsock2.h(1920): E2015 Ambiguity between 'fd_set' and 'Winsock::fd_set'
[BCC32 Error] winsock2.h(1918): E2015 Ambiguity between 'fd_set' and 'Winsock::fd_set'
[BCC32 Error] winsock2.h(1919): E2015 Ambiguity between 'fd_set' and 'Winsock::fd_set'
[BCC32 Error] winsock2.h(1920): E2015 Ambiguity between 'fd_set' and 'Winsock::fd_set'
[BCC32 Error] ScktComp.hpp(121): E2015 Ambiguity between 'sockaddr_in' and 'Winsock::sockaddr_in'
[BCC32 Error] ScktComp.hpp(148): E2015 Ambiguity between 'sockaddr_in' and 'Winsock::sockaddr_in'
[BCC32 Error] ScktComp.hpp(154): E2015 Ambiguity between 'sockaddr_in' and 'Winsock::sockaddr_in'
[BCC32 Error] ScktComp.hpp(174): E2015 Ambiguity between 'in_addr' and 'Winsock::in_addr'
[BCC32 Error] ScktComp.hpp(189): E2015 Ambiguity between 'sockaddr_in' and 'Winsock::sockaddr_in'
[BCC32 Error] ScktComp.hpp(191): E2015 Ambiguity between 'sockaddr_in' and 'Winsock::sockaddr_in'
[BCC32 Error] Idwinsock2.hpp(33): E2015 Ambiguity between 'fd_set' and 'Winsock::fd_set'
[BCC32 Error] Idwinsock2.hpp(34): E2015 Ambiguity between 'fd_set' and 'Winsock::fd_set'

I,ve changed conditional defines in project options to _WINSOCKAPI_
I use a lot of headers and don't know what to do now, and my boss is going to kill me if i don't, do it(it's my first job). All opinions are welcome.
esmet (Programmer)
25 Jul 11 7:00
By the way i'm converting from builder 6 to 2010.
Prattaratt (TechnicalUser)
25 Jul 11 14:37
You are going to have work through your propietary headers (ones that were written by your company). Since you are converting from BCB6 to 2010, pay particular attention to VCL calls where you need to convert from AnsiString to UnicodeString.  Next, check for function prototype differences between BCB6 and 2010. (I don't believe there are that many).  Any kind of error in a previous header can cause problems later in known to be stable headers, mainly because the offending header does not get completely processed.
smays (Programmer)
25 Jul 11 22:17
This may not be of any help, but the few occasions I have had trouble with winsock stuff was related to the order of the header files.  I was using some purchased MySQL libraries, which apparently used winsock stuff, and some Indy components.  Based on the suggestions of Builder users much smarter than me, I swapped the order of the header files and the problem went away.

It has been several years, but I think the errors as claimed by Builder were between winsock.h and winsock2.h and were of a similar nature to what you have written above, even though I personally had not #include'ed either header.  In fact, the headers were #included for me by the IDE as I slapped on the form the components mentioned above.

Steve.
esmet (Programmer)
26 Jul 11 1:44
I think i have a temporary solution. And i'm using it 'til I won't find anything else, I'm including <winsock2.h> in every *.cpp that have these certain errors,so I can do my work, but I'm not sure that there is some much better solution cuz I've tried a few #define _WINSOCKAPI_ and #define WIN32_LEAN_AND_MEAN and to add the winsock2.h before windows.h, but it turns out that <vcl.h> somehow refers to winsock.h as well, so you have to add winsock2.h before those 2 headers. If I'll find sth new about it I'll keep you posted. Thanks for advices.

Regards,
esmet

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close