Author Topic: showing compiler error  (Read 2359 times)

shankle

  • Member
  • ****
  • Posts: 835
showing compiler error
« on: March 13, 2013, 03:16:27 AM »
      03-12-2013
This is a 64-bit program
an attachment is included showing the error generated     
     
#define LINKFILES
#define codejps
#define WIN64
#INCLUDE windows.h

DATA SECTION
#ifndef LPSTR
  #if !x64
   #define LPSTR dd
  #else
   #define LPSTR dq
  #endif     
#endif 
CommandLine LPSTR  ?

hInstance        dq       0

.code
start:
   invoke GetModuleHandleA, NULL
; this is line 99 that the compiler is complaining about
; it makes no differance if the Q is included or not
   mov    Q[hInstance],rax
   invoke GetCommandLine
   invoke WinMain, [hInstance],NULL,[CommandLine],SW_SHOWDEFAULT
   invoke ExitProcess,rax   

wjr

  • Member
  • **
  • Posts: 209
    • WJR's website
Re: showing compiler error
« Reply #1 on: March 13, 2013, 05:49:29 AM »
Probably missing /x64 on the GoAsm command line.

shankle

  • Member
  • ****
  • Posts: 835
Re: showing compiler error
« Reply #2 on: March 13, 2013, 08:19:24 AM »
Thank you for responding WJR.
Yes, I forget the x64 switch AGAIN.

Also wondering when a field is defined  ex: hBrush   dd   0,
it does not need to be added to any Local statements.
Is this correct? As it showing  unreferenced at the end of the compile.

wjr

  • Member
  • **
  • Posts: 209
    • WJR's website
Re: showing compiler error
« Reply #3 on: March 13, 2013, 08:57:45 AM »
For 64-bit, that would be hBrush DQ... but correct, if defined globally, then you would not need to have it added to any LOCAL statement (if you did as well, then that LOCAL variable would be used instead of the global one). However, if unreferenced, then you usually would not need to define it at all.