0
_DATA SEGMENT
 return_address dq  0
 real_rbx       dq  0
_DATA ENDS

I'm getting these two errors from this code, I'm not sure what is wrong with it, I'm using x64

error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
error C2146: syntax error: missing ';' before identifier 'SEGMENT'
connor
  • 1
  • 1
    Looks like you tried to compile this as C++ instead of assembling. – Jester May 01 '21 at 01:34
  • @Jester Under properties>general>item type its set to Microsoft Macro Assembler – connor May 01 '21 at 01:36
  • and under build dependencies>build customizations masm is enabled – connor May 01 '21 at 01:39
  • The error messages are totally unambiguous that it's treating this as C. e.g. `int assumed. Note: C++ does not support default-int` is something only a C compiler would say about C (not C++); it makes no sense for asm. Also, the error/warning code numbers being C... instead of A.... are also a sign they're from MSVC compiler, MASM. I don't use visual studio myself, but there is a canonical Q&A about all the project settings you need to get it to actually build .asm files as assembly, see the linked duplicate. – Peter Cordes May 01 '21 at 02:01

0 Answers0