From: Alexey Zakhlestine Newsgroups: comp.os.msdos.djgpp Subject: Re: sockets under DJGPP ... help! gxx is acting up! Date: Sun, 19 Dec 1999 02:04:37 +0300 Organization: MTU-Intel ISP Lines: 45 Message-ID: <385C1305.2A496BAB@gs707.com> References: <83elfc$p2i AT journal DOT concentric DOT net> NNTP-Posting-Host: dial54217.mtu-net.ru Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit X-Trace: gavrilo.mtu.ru 945558280 38410 195.34.54.217 (18 Dec 1999 23:04:40 GMT) X-Complaints-To: usenet-abuse AT mtu DOT ru NNTP-Posting-Date: 18 Dec 1999 23:04:40 GMT X-Mailer: Mozilla 4.7 [en] (Win95; I) X-Accept-Language: ru To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Technophile wrote: > I'm trying to teach myself sockets w/ C++, and it's rough going--mainly > because DJGPP doesn't come with socket support already. Now, I *do* have > RSXNTDJ as well, which has everything I need, but when I put the following > into my programs: > > #include > #include > #include > #include > #include > #include > > ... I get an error message from gxx that tells me that it can't find some of > them. Here's what it looks like: > > D:\djgpp\practice>gxx -o test.exe test0022.cc > test0022.cc:1: sys/socket.h: No such file or directory (ENOENT) > test0022.cc:5: netdb.h: No such file or directory (ENOENT) > test0022.cc:6: arpa/inet.h: No such file or directory (ENOENT) > > Well, the files are all under <..\djgpp\rsxntdj\include\*.*>, but not under > DJGPP's default include directory (as defined in ). How can I > get the compiler to recognize that it needs to look in RSX's dir instead of > the default include? You should use command like this: D:\djgpp\practice>gxx -I..\djgpp\rsxntdj\include -o test.exe test0022.cc > I tried using > #include "D:/djgpp/rsxntdj/.../whatever.h" > so I could manually define it, but when I do that, it just gives me another > error message from the header file proclaiming that it's just declared a > header file twice (that being "types.h", which both DJ and RSX have in their > respective include directories)--what a pain. I think you should try to include only one version of "types.h"....You can use "#ifdef" for not including it twice... but anyway you can try using "namespaces". As far as I remember it allows you to use functions with the same names included from different sources, when you need functionality of both of them.... Someone correct me if I'm wrong...