Menu

INVOKE requires prototype...

Steve A
2011-11-09
2013-04-20
  • Steve A

    Steve A - 2011-11-09

    This line:

          invoke free, eax
    

    produces this error:

    Test.asm(184) : Error A2159: INVOKE requires prototype for procedure

    Here is a list of Includes and IncludeLibs I'm using:

        include ..\Include\windows.inc
        include ..\Include\CommCtrl.inc
        include ..\Include\commdlg.inc
        include ..\Include\oleauto.inc
        include ..\Include\windowsx.inc
        includelib ..\Lib\user32.lib
        includelib ..\Lib\gdi32.lib
        includelib ..\Lib\kernel32.lib
        includelib ..\Lib\comctl32.lib
        includelib ..\Lib\comdlg32.lib
        includelib ..\Lib\shell32.lib
        includelib ..\Lib\oleaut32.lib
        includelib ..\Lib\crtdll.lib
        includelib ..\Lib\msvcrt.lib
    

    Normally required headers: stdlib.h, malloc.h

    What headers or Include files should I use ?

     
  • japheth

    japheth - 2011-11-09

    WinInc contains a file "stdlib.inc". It might do what you want. If no, then you'll have to create the include file on your own.

     
  • Steve A

    Steve A - 2011-11-09

    >WinInc contains a file "stdlib.inc".

    When I include "stdio.inc" or "stdlib.inc", I get numerous errors and assembly fails.
    Assembles fine without it, as long as I don't need anything in them.

     
  • Steve A

    Steve A - 2011-11-09

    Adding this line:

        include ..\wininc\Include\stdlib.inc
    

    produces 52 errors:

    JWasm v2.06e, Jul 22 2011, Masm-compatible assembler.
    Portions Copyright (c) 1992-2002 Sybase, Inc. All Rights Reserved.
    Source code is available under the Sybase Open Watcom Public License.
    stdlib.inc(4) : Error A2102: Symbol not defined : _MSC_VER
     stdlib.inc(4): Included by
      BXB.inc(11): Included by
       Test2.asm(17): Main line code
    stdlib.inc(9) : Error A2102: Symbol not defined : defined
     stdlib.inc(9): Included by
      BXB.inc(11): Included by
       Test2.asm(17): Main line code
    stdlib.inc(26) : Error A2102: Symbol not defined : defined
     stdlib.inc(26): Included by
      BXB.inc(11): Included by
       Test2.asm(17): Main line code
    stdlib.inc(30) : Error A2102: Symbol not defined : _MSC_VER
     stdlib.inc(30): Included by
      BXB.inc(11): Included by
       Test2.asm(17): Main line code
    stdlib.inc(56) : Error A2102: Symbol not defined : __STDC__
     stdlib.inc(56): Included by
      BXB.inc(11): Included by
       Test2.asm(17): Main line code 
    ...(snip)
    
     
  • Steve A

    Steve A - 2011-11-09

    I figured something out.
    Include ..\..\windows.inc  must come first.
    If stdio.inc or stdlib.inc precede windows.inc, it generates errors.

     

Log in to post a comment.