f



winsock compile crash

The following errors are from a file with just windows and winsock2
included.


C:\Users\ioil\Desktop\dm\bin>dmc sockit.c
typedef struct fd_set {
                      ^
C:\Users\ioil\Desktop\dm\bin\..\include\win32\WINSOCK2.H(85) : Error:
'fd_set' is already defined
} fd_set;
^
C:\Users\ioil\Desktop\dm\bin\..\include\win32\WINSOCK2.H(88) : Error:
identifier or '( declarator )' expected
struct timeval {
               ^
C:\Users\ioil\Desktop\dm\bin\..\include\win32\WINSOCK2.H(129) : Error:
'timeval' is already defined
};
^
C:\Users\ioil\Desktop\dm\bin\..\include\win32\WINSOCK2.H(132) : Error:
identifier or '( declarator )' expected
struct  hostent {
                ^
C:\Users\ioil\Desktop\dm\bin\..\include\win32\WINSOCK2.H(185) : Error:
'hostent' is already defined
Fatal error: too many errors
--- errorlevel 1

C:\Users\ioil\Desktop\dm\bin>


What's already been tried : placing the winsock.dll file in the same
directory as the compiler and program to be compiled, placing it in
the system32 directory, and entering it in the registry with the
regsrv32 command. Don't really know where to go from here, appreciate
any advice . . .
0
ioil
6/17/2010 5:20:27 AM
comp.win.tools.winsock 400 articles. 0 followers. Post Follow

2 Replies
301 Views

Similar Articles

[PageSpeed] 23

ioil wrote:
> The following errors are from a file with just windows and winsock2
> included.

Stupid as it is, you have to include winsock2.h before windows.h. Also make
sure other headers don't include windows.h indirectly before winsock2.h.

> C:\Users\ioil\Desktop\dm\bin>dmc sockit.c
> typedef struct fd_set {

Wait: Is that a line of your file or does it point to the WinSock header?


> What's already been tried : placing the winsock.dll file in the same
> directory as the compiler and program to be compiled, placing it in
> the system32 directory, and entering it in the registry with the
> regsrv32 command.

This is a compiler error, at the stage where your program is translated into
machine code. The next step would be linking it into an executable. The
last step is loading the program into a process and executing it, which is
the place where DLLs come into the game.

Uli

-- 
Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932

0
Ulrich
6/17/2010 8:44:08 AM
On Jun 17, 12:44=A0am, Ulrich Eckhardt <eckha...@satorlaser.com> wrote:
> ioil wrote:
> > The following errors are from a file with just windows and winsock2
> > included.
>
> Stupid as it is, you have to include winsock2.h before windows.h. Also ma=
ke
> sure other headers don't include windows.h indirectly before winsock2.h.
>
> > C:\Users\ioil\Desktop\dm\bin>dmc sockit.c
> > typedef struct fd_set {
>
> Wait: Is that a line of your file or does it point to the WinSock header?
>
> > What's already been tried : placing the winsock.dll file in the same
> > directory as the compiler and program to be compiled, placing it in
> > the system32 directory, and entering it in the registry with the
> > regsrv32 command.
>
> This is a compiler error, at the stage where your program is translated i=
nto
> machine code. The next step would be linking it into an executable. The
> last step is loading the program into a process and executing it, which i=
s
> the place where DLLs come into the game.
>
> Uli
>
> --
> Sator Laser GmbH
> Gesch=E4ftsf=FChrer: Thorsten F=F6cking, Amtsgericht Hamburg HR B62 932

Dear Uli,

Wow, changing the order of the includes fixed it, brilliant, thank you
very much.

ioil
0
ioil
6/18/2010 8:44:21 AM
Reply:

Similar Artilces:

Winsock ActiveX to Winsock API ?
Hello, I use winsock ActiveX in my application. set property Winsock->RemotePort Winsock->RemoteHost call Winsock->Connect and Winsock->SendData and received data through "DataArrival event" my problem is : in windows 7 there no winsock activeX. That's a trouble for me. Because that reason i want to use winsock API instead of Winsock ActiveX. In winsock i found nothing to show me the event DataArrival. Did i need to call recv until there are error code return ? Thanks! On Mar 25, 10:58=A0pm, "Nhat Dung" <nhatd...@hotmail...

winsock
What does the parameter AF_INET mean? It is part of one of the SDK functions. Bill Bill Cunningham wrote: > What does the parameter AF_INET mean? It is part of one of > the SDK functions. The AF_INET is just a #define used to set the sin_family member which is part of the sockaddr_in structure. For example here is some code that sets up the sockaddr_in structure for a given host name: char *host_name; // "www.zeuseit.com" or "255.64.25.10" etc; struct sockaddr_in server; //-- check for a raw IP address if (isdigit(ho...

WinSock
I've been searching for a while now and can't find anything that actually seems related. In the same game as my previous post about CreateFile() (which was resolved, by the way), it now can't get past a WinSock initialization. It's returning the error code 10009 (for a bad file descriptor or some such). Any ideas would be GREATLY appreciated!!! Game: http://www.ezaccess.net/ognet On May 20, 11:54 pm, notch....@gmail.com wrote: > I've been searching for a while now and can't find anything that > actually seems related. In the same game as my previous...

WinSock
Hello! Does anyone know where to find SDK for WinSock library? Thanks! Dummy wrote: > Does anyone know where to find SDK for WinSock library? Why not just use the BSD like sockets that come as standard with the MSVC++ compiler? For example something like this should compile fine using the standard Windows SDK that comes with MSVC++: #include <windows.h> int test() { WSAStartup(wVersion, &wsaData); int sockfd = socket(AF_INET, SOCK_STREAM, 0); closesocket(sockfd); WSACleanup(); } If you do not have MSVC++ t...

Winsock
What's the 3rd party add-on market these days for winsock controls? Has to run with 6.0 since I'm an old fart :) Paul SGksDQoNCkNoZWNrIENhdGFseXN0IFNvY2tldFRvb2xzDQpodHRwOi8va2xhcmlzb2Z0LmNvbS9L U05ld3NfMTk2Lmh0bQ0KDQpMZW9uaWQgQ2h1ZGFrb3YNCmNodWRha292QGtsYXJpc29mdC5jb20N Cg0K0LLRgtC+0YDQvdC40LosIDMwINGB0LXQvdGC0Y/QsdGA0Y8gMjAxNMKg0LMuLCA0OjEwOjIy IFVUQys0INC/0L7Qu9GM0LfQvtCy0LDRgtC10LvRjCBjbGFja21hbm5hbiDQvdCw0L/QuNGB0LDQ uzoNCj4gV2hhdCdzIHRoZSAzcmQgcGFydHkgYWRkLW9uIG1hcmtldCB0aGVzZSBkYXlzIGZvciB3 aW5zb2NrIGNvbnRyb2xzPw0KPiANCj4gSGFzIHRvIHJ1biB3aXRoIDYuMCBzaW5jZSBJJ20gYW4g ...

winsock
Dear Group, i would like to explain me if you could how i cold make a server in visual basic with multiplt sockets. I use the included winsock compoment. I would like to load about 100 free socket. Any ideas? On Mon, 7 Feb 2005 10:06:07 +0200, "������ ������������" <pappaskostas@ath.forthnet.gr> you typed some letters in random order: >Dear Group, > >i would like to explain me if you could how i cold make a server in visual >basic with multiplt sockets. I use the included winsock compoment. I would >like to load about 100 free socket. Any ideas...

Winsock
Hello all i need a solution to the following problem I have an application which listens to a port for incoming connections from a client via a Winsock. let's call this Winsock1 Upon a connection of a client i would like the application to call an ActiveX.exe which also has a Winsock Control (Winsock2), and i would like to transfer the Winsock1 information to Winsock2, hence allowing the client now to talk directly to the Winsock2 on the ActiveX control, and hence freeing up the Winsock1 to start listening again. And if another client connects then i would like the same to happen again...

Winsock
Hello! Can someone tell me is it possible to use Winsock control in Access? If yes please post some examples or web adresses where to find more information. Thank you! Thank you! "TC" <a@b.c.d> wrote in message news:1064232824.878783@teuthos... > If you go to groups.google.com, click Advanced Groups Search, type *access* > into the newsgroups box, and winsock into the "all words" box, you will find > 1920 entries ... > > HTH, > TC > > > "Schuco" <schuco@pituljica.com> wrote in message > news:bkmekr$nta$1@ls219.htnet....

WinSock
Hi, I'm writing app where I use WinSock, but I have experienced a problem. WinSock only sends the data after finishing the calling sub/function. Can I force WinSock immediately as I need to send several packets but they have to be sent separate? Many thanks Niels Borg "Niels Borg" <nbborg@hotmail.com> wrote in message news:3f15451f$0$32493$edfadb0f@dread16.news.tele.dk > Hi, > > I'm writing app where I use WinSock, but I have experienced a problem. > WinSock only sends the data after finishing the calling sub/function. > Can I force WinSock immediate...

winsock under win 2000
hellow all. i have server client vb program thet use winsock. when the server is running under win 2000 i get from some clients, not all, un complited string. i dont whant to change things in the client side. only in the server side. is there a solution? thanks. ...

Win Win Win Win......
Win Win Win Win...... Win cash Rs.10,000. SMS BLUFF to 57333 (Only For Indian) Free Registration! - Register here Free:- http://offr.biz/HLDDT337130BVGMJPF (....Free Offer is Valid Only For First 250 members who Registered...) ------------------------------------------------------------------------------- ...

winsock problem under win 2000
hellow all. i have server client vb program thet use winsock. when the server is running under win 2000 i get from some clients, not all, un complited string. i dont whant to change things in the client side. only in the server side. is there a solution? thanks. ...

Compiling and linking winsock apps
I am new to winsock and am having trouble compiling and linking winsock app in visual studio in C. To my understanding, we need to #include <winsock.h>, right? But what's the library file do you use to link them? Is it winsock.lib? If so, I don't seem to have it. Do we need to get this file separately on the web? If so, where do you get it from? I've googled around but can't seem to find a working site that offers it. It doesn't make sense though since Visual Studio should have the required library for winsock, since it already include winsock.h, but ...

winsock problem under win 2000
hellow all. i have server client vb program thet use winsock. when the server is running under win 2000 i get from some clients, not all, un complited string. i dont whant to change things in the client side. only in the server side. is there a solution? thanks. ...

Web resources about - winsock compile crash - comp.win.tools.winsock

Winsock - Wikipedia, the free encyclopedia
In computing , the Windows Sockets API (WSA) , which was later shortened to Winsock , is a technical specification that defines how Windows network ...

Thanks for Trumpet Winsock - Recognising an unsung hero
Recognising an unsung hero Do you remember connecting to the Internet in 1994 or 1995? Those of you do probably remember Trumpet Winsock. That ...

WinSock and more Open Source for your Windows Store apps
... platform commonality through universal Windows app... Today I want to follow up with some exciting news about the availability of WinSock and ...

David Treadwell - CrunchBase Profile
David Treadwell is corporate vice president of Microsoft’s Live Platform Services, a group that’s defining and implementing the next generation ...

Spyware - Wikipedia, the free encyclopedia
Spyware is a type of malware (malicious software) installed on computers that collects information about users without their knowledge. The presence ...

ActiveXperts Software - Product overview
Network Monitoring products and Windows Development components and tools by ActiveXperts Software

Weblib Database @ Alaska Software
... compatibility Version(1)Date(14.03.1900)Time(15:00:00)Size(93431)Needs(1.3.212)OS(W32)Format(ZIP)Language(Intl)Keywords(Socket, Internet, Winsock, ...

Freelancing tips - Binary Tides
... Adsense Database Freelancing Linux Programming Hacking Networking PHP Php Snippets Tutorial Socket Programming C Java Perl PHP Python Winsock ...

U-Mail邮件系统常见的退信分析 - U-MAIL邮件服务器资讯 - 比特博客
U-Mail邮件系统常见的退信分析看退信最下面的日志,并按照相应的错误信息进行匹配。511 sorry, no mailbox here by that nameunknown user account... User unknownName server r ..

CodeGuru - Microsoft developers related ideas, articles, tips, tricks, comments, downloads, and so much ...
CodeGuru is where developers can come to share ideas, articles, questions, answers, tips, tricks, comments, downloads, and so much more related ...

Resources last updated: 1/28/2016 6:36:26 AM