Author Topic: GoAsm giving error  (Read 546 times)

shankle

  • Member
  • ****
  • Posts: 746
GoAsm giving error
« on: May 03, 2017, 10:07:44 PM »

           5-3-2017
Thanks for any help
Don't see why this error is occurring

GoAsm.Exe Version 0.61.0.0 - Copyright Jeremy Gordon 2001-2016 - JG@JGnet.co.uk

Error!
Line 109 of assembler source file (xxxx.asm):-
Could not get size of structure/union in local data declaration:-
LOCAL wc:WNDCLASSEXA,msg:MSG,hWnd,RR:RECT
  In the struct at Line 1396 of the include file winbase.h

OBJ file not made
GoLink.Exe Version 1.0.2.3 - Copyright Jeremy Gordon 2002-2016 - JG@JGnet.co.uk

----------
Winbase.h
1396  #define GetCommandLine GetCommandLineA
------
Program
.const
RECT STRUCT
left   dd ?
top    dd ?
right  dd ?
bottom dd ?
RECT ENDS
-------

CommandLine LPSTR  ?
------

107  WinMain:
108  FRAME hInst,hPrevInst,CmdLine,CmdShow
109  LOCAL wc:WNDCLASSEXA,msg:MSG,hWnd,RR:RECT
------

.code
start:
   invoke GetModuleHandleA, NULL
   mov    Q[hInstance],rax
   invoke GetCommandLine
   invoke WinMain, [hInstance],NULL,[CommandLine],SW_SHOWDEFAULT
   invoke ExitProcess,rax

rsala

  • Member
  • **
  • Posts: 234
    • Easy Code
Re: GoAsm giving error
« Reply #1 on: May 06, 2017, 03:34:36 AM »
I cannot get th error you report, may I see the whole source code?
EC coder

shankle

  • Member
  • ****
  • Posts: 746
Re: GoAsm giving error
« Reply #2 on: May 06, 2017, 04:10:54 AM »
Thank you for responding Rsala.
The program is in the very early stages of development and is rather
embarrassing at this point.
But I have a couple of theories about the problem. They seem to revolve around
RECT and POINT. I am under the impression that ALL structs must be in the ".const"
section. When I take them out of the ".const" and put them in the data section under
the dd I get different errors. Still working on it.

shankle

  • Member
  • ****
  • Posts: 746
Re: GoAsm giving error
« Reply #3 on: May 06, 2017, 06:50:30 AM »
The previous error was caused by msg:MSG in Winmain Local.
Should be just msg.

The next error is not finding "PT.dll". Some progress. This error
is worse than the previous one.

shankle

  • Member
  • ****
  • Posts: 746
Re: GoAsm giving error
« Reply #4 on: May 09, 2017, 11:13:26 PM »
Found error. Problem solved.

rsala

  • Member
  • **
  • Posts: 234
    • Easy Code
Re: GoAsm giving error
« Reply #5 on: May 18, 2017, 06:57:42 AM »
Glad to hear that! :t
EC coder

Oller

  • Regular Member
  • *
  • Posts: 1
Re: GoAsm giving error
« Reply #6 on: July 22, 2017, 04:55:10 AM »
Found error. Problem solved.

He Shankle, I get an error on Line 109 too.

Was it an easy fix?

shankle

  • Member
  • ****
  • Posts: 746
Re: GoAsm giving error
« Reply #7 on: July 22, 2017, 11:53:39 PM »
Hi Oller,
To long ago for me to remember.
I clear storage(mental that is) after 1 day.
That is the main problem with old fogies :)

BugCatcher

  • Regular Member
  • *
  • Posts: 30
Re: GoAsm giving error
« Reply #8 on: July 23, 2017, 09:25:35 PM »
Rect in const. section? Why not .data?