Page 1 of 1

[OT] socket communications

Posted: Wed Mar 10, 2010 10:29 am
by HJarausch
Hi,
I had a hard time googling for how to use sockets under MinGW.
I have code which works under Linux but gives missing header files under MinGW.
Furthermore I have code which works under Windows-native/Visual C++.
This, using WinSock2.h, compiles under CodeLite but gives a run time error
when started (some missing WinMain@16).

Since CodeLite is able to access its homepage and in addition there is a Subversion
plugin, it must be possible to use sockets when using CodeLite under MinGW.

Many thanks for a hint or pointer,
Helmut.

Re: [OT] socket communications

Posted: Wed Mar 10, 2010 10:59 am
by eranif
HJarausch wrote:This, using WinSock2.h
This should be enough
HJarausch wrote:but gives a run time error
when started (some missing WinMain@16).
Can u post the complete build log?

Do you have main function?
Eran

Re: [OT] socket communications

Posted: Wed Mar 10, 2010 3:18 pm
by frank_frl

Re: [OT] socket communications

Posted: Wed Mar 10, 2010 3:31 pm
by HJarausch
Thanks, I discovered I have to link to libws2_32. Now it works.

Helmut.