flat assembler
Message board for the users of flat assembler.

Index > Windows > Error with current example of quetannon.

Author
Thread Post new topic Reply to topic
asmdemon



Joined: 18 Jan 2004
Posts: 97
Location: Virginia Beach, VA
asmdemon
This one is easy to represent. Download http://flatassembler.net/examples/quetannon.zip from examples section on this site.

This familiar example, "Demonstration of using WinSock library to make TCP/IP connections.
Written by Tomasz Grysztar" NO LONGER compiles. Sadly i'm unaware of why.

I'm using Ver. 1.67.26 for windows, and other examples compile including source for fasm compiles fine, but i get the following error compiling this example:
Code:
line 100:  mov     [saddr.sin_addr],0  
Error undefined symbol 'saddr.sin_addr'     

I lack the compiler internal knowledge to try to find the problem, so if anyone else has encountered this issue, plz tell me how to fix it, else can Tomasz plz look to see if the problem is due to a new version edit?


EDIT: After a little test and source code searching i found the problem. the INCLUDE\EQUATES\WSOCK32.INC file has " . " in front of every item in the structs. remove these leading periods . . . . to fix the problem.

old code:
Code:
struct WSADATA
  .wVersion       dw ?
  .wHighVersion   dw ?
  .szDescription  rb 256+1
  .szSystemStatus rb 128+1
  .iMaxSockets    dw ?
  .iMaxUdpDg      dw ?
  .lpVendorInfo   dd ?
ends     


change to this:
Code:
struct WSADATA
  wVersion       dw ?
  wHighVersion   dw ?
  szDescription  rb 256+1
  szSystemStatus rb 128+1
  iMaxSockets    dw ?
  iMaxUdpDg      dw ?
  lpVendorInfo   dd ?
ends     

_________________
It is better to be on the right side of the devil than in his path.
Post 16 May 2008, 03:11
View user's profile Send private message Visit poster's website Reply with quote
sinsi



Joined: 10 Aug 2007
Posts: 693
Location: Adelaide
sinsi
Mine compiles OK, except I had to put the full 'c:\fasm\include\win32a.inc' instead.

edit: cross-posted.
Post 16 May 2008, 03:27
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.