Thread: [Dev-C++] Linux 'socket' calls...
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: P.D. v. Z. <pd...@xs...> - 2002-11-23 00:16:54
|
Hi, I'm trying to write a program which should be able to compile on Linux using gcc (actually, g++, but still), as well as under Dev-C++ (that's my goal). It appears mingw (I suppose?) doesn't implement 'socket()' or any of these functions, and the only way I can develop my program at the moment, is by writing my code in Dev-C++, then using cygwin to compile it, and then in a command window execute the program to see if it all works well... seems to me like this could be done simpler.... for example, by hitting 'Compile' from within Dev-C++ :P I hope it's somehow possible to perform these socket calls and be able to compile the code from within the IDE (I think the ones that are giving the most trouble are "fnctl", "ioctl", "socket", "write" etc). Why oh why did I have to make this project cross-platform :| Anyway, I hope anyone can help me with this... or if someone could tell me "it can't be done" or anything. Thanks in advance, Paul |
|
From: Brenden T. <br...@rc...> - 2002-11-23 01:44:35
|
I think you need to use the winsock API. I've never used it, but it appears to provide a Unix compatible TCP/IP interface. The FAQ is at: http://tangentsoft.net/wskfaq/ Don't forget to also check out the winsock API (there's a link in the FAQ but here it is anyway: http://www.sockets.com/winsock2.htm#Docs ) Good luck, Brenden P.D. van Zelst wrote: > Hi, > > > I'm trying to write a program which should be able to compile on Linux > using gcc (actually, g++, but still), as well as under Dev-C++ (that's > my goal). It appears mingw (I suppose?) doesn't implement 'socket()' > or any of these functions, and the only way I can develop my program > at the moment, is by writing my code in Dev-C++, then using cygwin to > compile it, and then in a command window execute the program to see if > it all works well... seems to me like this could be done simpler.... > for example, by hitting 'Compile' from within Dev-C++ :P > I hope it's somehow possible to perform these socket calls and be able > to compile the code from within the IDE (I think the ones that are > giving the most trouble are "fnctl", "ioctl", "socket", "write" etc). > Why oh why did I have to make this project cross-platform :| > > Anyway, I hope anyone can help me with this... or if someone could > tell me "it can't be done" or anything. > > Thanks in advance, > > > Paul > > |
|
From: <jp...@bo...> - 2002-11-23 02:28:38
|
Sorry for the last html e-mail...=20
Can I allocate memory for a member of a class dynamically? For
example:
class test{
public:
int *p;
test(int size);
}
test::test(int size){p =3D new int[50];}
Is it illegal?
Juliano
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...] On Behalf Of P.D. van
Zelst
Sent: sexta-feira, 22 de novembro de 2002 21:17
To: dev...@li...
Subject: [Dev-C++] Linux 'socket' calls...
Venha para a VilaBOL!=20
O melhor lugar para voc=EA construir seu site. F=E1cil e gr=E1tis!
http://vila.bol.com.br=20
Hi,
I'm trying to write a program which should be able to compile on Linux
using gcc (actually, g++, but still), as well as under Dev-C++ (that's
my goal). It appears mingw (I suppose?) doesn't implement 'socket()' or
any of these functions, and the only way I can develop my program at the
moment, is by writing my code in Dev-C++, then using cygwin to compile
it, and then in a command window execute the program to see if it all
works well... seems to me like this could be done simpler.... for
example, by hitting 'Compile' from within Dev-C++ :P
I hope it's somehow possible to perform these socket calls and be able
to compile the code from within the IDE (I think the ones that are
giving the most trouble are "fnctl", "ioctl", "socket", "write" etc).
Why oh why did I have to make this project cross-platform :|
Anyway, I hope anyone can help me with this... or if someone could tell
me "it can't be done" or anything.
Thanks in advance,
Paul
|
|
From: Ioannis V. <no...@ho...> - 2002-11-23 10:45:22
|
> -----Original Message-----
> From: dev...@li...=20
> [mailto:dev...@li...] On Behalf=20
> Of Juliano P=E1vel Brasil Cust=F3dio
> Sent: Saturday, November 23, 2002 5:30 AM
> To: dev...@li...
> Subject: [Dev-C++] dynamic allocation of a class member
>=20
>=20
> Sorry for the last html e-mail...=20
>=20
> Can I allocate memory for a member of a class dynamically? For
> example:
>=20
> class test{
> public:
> int *p;
> test(int size);
> }
>=20
> test::test(int size){p =3D new int[50];}
>=20
> Is it illegal?
Yes you can. It is legal.
Ioannis Vranos
=20
* Programming pages: http://www.noicys.freeurl.com
* Alternative URL: http://run.to/noicys
|
|
From: <jp...@bo...> - 2002-11-23 02:46:20
|
Can I allocate memory for a member of a class dynamically? For
example:
=20
class test{
public:
int *p;
test(int size);
}
=20
test::test(int size){p =3D new int[50];}
=20
Is it illegal?
=20
Juliano
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...] On Behalf Of P.D. van
Zelst
Sent: sexta-feira, 22 de novembro de 2002 21:17
To: dev...@li...
Subject: [Dev-C++] Linux 'socket' calls...
_____ =20
Venha para a VilaBOL!=20
O melhor lugar para voc=EA construir seu site. F=E1cil e gr=E1tis!
http://vila.bol.com.br <ttp://vila.bol.com.br/> =20
_____ =20
Hi,
=20
=20
I'm trying to write a program which should be able to compile on Linux
using gcc (actually, g++, but still), as well as under Dev-C++ (that's
my goal). It appears mingw (I suppose?) doesn't implement 'socket()' or
any of these functions, and the only way I can develop my program at the
moment, is by writing my code in Dev-C++, then using cygwin to compile
it, and then in a command window execute the program to see if it all
works well... seems to me like this could be done simpler.... for
example, by hitting 'Compile' from within Dev-C++ :P
I hope it's somehow possible to perform these socket calls and be able
to compile the code from within the IDE (I think the ones that are
giving the most trouble are "fnctl", "ioctl", "socket", "write" etc).
Why oh why did I have to make this project cross-platform :|
=20
Anyway, I hope anyone can help me with this... or if someone could tell
me "it can't be done" or anything.
=20
Thanks in advance,
=20
=20
Paul
=20
=20
|