The MASM Forum

Projects => Rarely Used Projects => GoAsm => Topic started by: shankle on May 03, 2017, 10:07:44 PM

Title: GoAsm giving error
Post by: shankle 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
Title: Re: GoAsm giving error
Post by: rsala on May 06, 2017, 03:34:36 AM
I cannot get th error you report, may I see the whole source code?
Title: Re: GoAsm giving error
Post by: shankle 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.
Title: Re: GoAsm giving error
Post by: shankle 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.
Title: Re: GoAsm giving error
Post by: shankle on May 09, 2017, 11:13:26 PM
Found error. Problem solved.
Title: Re: GoAsm giving error
Post by: rsala on May 18, 2017, 06:57:42 AM
Glad to hear that! :t
Title: Re: GoAsm giving error
Post by: BugCatcher on July 23, 2017, 09:25:35 PM
Rect in const. section? Why not .data?