Re: OB 4.2.0: Shooting <winsock.h> trouble...
Dion Picco <[email protected]>
| Newsgroups | gmane.comp.corba.orbacus |
|---|---|
| Organization | IONA | Making Software Work Together TM |
| Message-ID | <[email protected]> |
Hi Martin, On Fri, Sep 17, 2004 at 03:15:26PM +0100, Martin Simmons wrote: > >>>>> On Fri, 17 Sep 2004 10:15:39 -0230, Dion Picco <[email protected]> said: > > Dion> On Fri, Sep 17, 2004 at 02:44:33PM +0200, André Borrmann wrote: > >> > >> Hello OB Users, > >> > >> I'm using Orbacus on Windows (VC7) and recently update > >> from version 4.1.3 to > >> 4.2.0. The Orbacus developers have choosen to use <winsock2.h> instead of > >> <winsock.h>, as you can see in OB/Net.h and OB/WinConfig.h. > >> This can produce some trouble if you use another library which > >> includes <winsock.h>, as it was in my case. You can walk around this > >> problem if you rearrange the order of includes in your own files: > >> the orbacus-includes first, the others afterwards... > >> > >> Regards, > >> > >> André > > Dion> Thanks for the tip. We've had other people have similar problems with > Dion> other include files as well. I think the best practice to keep > Dion> in mind is to include the Orbacus headers first as a rule. > Dion> There may be exceptions to this but usually this works out good. > > I'm puzzled about why the user-level Orbacus headers include winsock at all. > The implementation of the socket layer in Orbacus would clearly need it, but > surely the CORBA code that users write doesn't? > > __Martin Well, there are a couple of things to consider here: 1. For basic Orbacus user-level headers you're right - winsock2 shouldn't be included directly. I suspect a dependency is hanging around here somewhere and when I get the time I will try to figure out where exactly. I suspect something is including Net.h which is including something else which is including... you get the idea. ;) 2. As a sourcecode product, we really can't make assumptions as to which headers people will include. People are free to include anything and cast classes around to whatever they like. Such a case as this will be impossible for us to guard against the inclusion of system headers. I don't know whether Andr falls into category 1 or 2. However I suspect that category 1 still exists and will be examined in the future to remove the dependency. -- Dion Picco, Software Engineer IONA Technologies Inc. Team Orbacus - Your CORBA Source mailto:[email protected] http://www.orbacus.com _______________________________________________ OB-Users Mailing List - [email protected] http://mail.ooc.nf.ca/mailman/listinfo/ob-users Visit our support FAQ before you send a message. http://www.orbacus.com/faq/support.html