News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

showing compiler error

Started by shankle, March 13, 2013, 03:16:27 AM

Previous topic - Next topic

shankle

      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

Probably missing /x64 on the GoAsm command line.

shankle

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

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.