News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Heloo - Back to masm againg ...

Started by lucky69, February 11, 2005, 07:56:37 PM

Previous topic - Next topic

lucky69

Hey - I have got some problems in somre basic complilations and really do not know why.I have already made the sp1 update.
After installation there are some errors ::):

Assembling: testinst.asm
testinst.asm(24) : error A2190: INVOKE requires prototype for procedure
testinst.asm(33) : error A2006: undefined symbol : MSG
testinst.asm(33) : error A2195: parameter or local cannot have void type
testinst.asm(34) : error A2006: undefined symbol : WNDCLASSEX
testinst.asm(34) : error A2195: parameter or local cannot have void type
testinst.asm(36) : error A2190: INVOKE requires prototype for procedure
testinst.asm(39) : error A2190: INVOKE requires prototype for procedure
testinst.asm(59) : error A2190: INVOKE requires prototype for procedure
testinst.asm(61) : error A2190: INVOKE requires prototype for procedure
testinst.asm(73) : error A2190: INVOKE requires prototype for procedure
DisplayWindow(1): Macro Called From
  testinst.asm(73): Main Line Code
testinst.asm(73) : error A2190: INVOKE requires prototype for procedure
DisplayWindow(2): Macro Called From
  testinst.asm(73): Main Line Code
testinst.asm(76) : error A2190: INVOKE requires prototype for procedure
testinst.asm(77) : error A2190: INVOKE requires prototype for procedure
testinst.asm(98) : error A2190: INVOKE requires prototype for procedure
testinst.asm(102) : error A2190: INVOKE requires prototype for procedure
testinst.asm(110) : error A2190: INVOKE requires prototype for procedure
testinst.asm(113) : error A2190: INVOKE requires prototype for procedure
testinst.asm(114) : error A2190: INVOKE requires prototype for procedure
testinst.asm(116) : error A2190: INVOKE requires prototype for procedure
testinst.asm(123) : error A2190: INVOKE requires prototype for procedure
testinst.asm(45) : error A2006: undefined symbol : cbSize
testinst.asm(46) : error A2006: undefined symbol : style
testinst.asm(48) : error A2006: undefined symbol : lpfnWndProc
testinst.asm(49) : error A2006: undefined symbol : cbClsExtra
testinst.asm(50) : error A2006: undefined symbol : cbWndExtra
testinst.asm(51) : error A2006: undefined symbol : hInstance
testinst.asm(52) : error A2006: undefined symbol : hbrBackground
testinst.asm(53) : error A2006: undefined symbol : lpszMenuName
testinst.asm(54) : error A2006: undefined symbol : lpszClassName
testinst.asm(55) : error A2166: structure field expected
m2m(2): Macro Called From
  testinst.asm(55): Main Line Code
testinst.asm(56) : error A2166: structure field expected
m2m(2): Macro Called From
  testinst.asm(56): Main Line Code
testinst.asm(57) : error A2006: undefined symbol : hIconSm
m2m(2): Macro Called From
  testinst.asm(57): Main Line Code
testinst.asm(81) : error A2006: undefined symbol : wParam

And it is not the first time.How to fix it ?
In my opinion there got to be something wrong with the system [Xp pro] but I am not really sure.

Thx  ::) ::)

00100b

It looks like you might be missing the INCLUDE directive for the WINDOWS.INC file.

lucky69

Actually this is resoult of the test-asm-if installation is fine-file not some project bad-compilation result.I am not really in subject right now
just starting over

pbrennick

lucky,
Can you post the code so we can figure out the problem?

Paul

lucky69

Hi - I U have ever made such a installation of masm32 under WinXP there is an automatic file test (at the end of building API windows calls), It checks if everything is fine I believe and in my case right here it is not.

I have got some message :

\masm32\include\makro.inc(66) : error A2125: missing macro argument
MOVM(1): Macro Called From
  \masm32\include\makro.inc(66): Include File
\masm32\include\makro.inc(66) : error A2008: syntax error : in instruction
MOVM(1): Macro Called From
  \masm32\include\makro.inc(66): Include File

Makro.inc its definition of macros and const used in windows.It is similar to windows.inc - the whole code looks:

include \masm32\include\makro.inc

INCLUDEEX kernel32

.data?
tmpV dd ?

.data


.code

Start:

invoke AllocConsole
invoke GetStdHandle,STD_OUTPUT HANDLE
invoke WriteConsole,eax \
DTEXT(txKonsola, "Everything works fine"), \
SIZEOF TxKonsola,OFS tmpV,NULL

invoke Sleep,2000

invoke FreeConsole

invoke ExitProcess,0

END Start

pbrennick

Without knowing what is contained in makro.inc
, there is nothing I can do to help you.  Are you building this code via an ide?  The lack of some needed declarations may be problematic.  The case declaration in particular.  That usually causes errors to show up in include files.

Paul

lucky69

Back again without makro.inc less errors but stiill some occure, looks like that

Assembling: C:\my_stuff\masm\konsola.asm
C:\my_stuff\masm\konsola.asm(20) : error A2206: missing operator in expression
C:\my_stuff\masm\konsola.asm(20) : error A2114: INVOKE argument type mismatch :
argument : 1
C:\my_stuff\masm\konsola.asm(21) : error A2136: too many arguments to INVOKE
C:\my_stuff\masm\konsola.asm(21) : error A2206: missing operator in expression
C:\my_stuff\masm\konsola.asm(21) : error A2114: INVOKE argument type mismatch :
argument : 5
C:\my_stuff\masm\konsola.asm(21) : error A2006: undefined symbol : TxKonsola
C:\my_stuff\masm\konsola.asm(21) : error A2114: INVOKE argument type mismatch :
argument : 4
C:\my_stuff\masm\konsola.asm(21) : error A2084: constant value too large
C:\my_stuff\masm\konsola.asm(21) : error A2114: INVOKE argument type mismatch :
argument : 3
C:\my_stuff\masm\konsola.asm(21) : error A2006: undefined symbol : DTEXT
C:\my_stuff\masm\konsola.asm(21) : error A2114: INVOKE argument type mismatch :
argument : 2
_
Assembly Error

Any idea for begginer  ??

lucky69

I have just add some basic includes :
.586

.MODEL FLAT, STDCALL

include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
include \masm32\include\user32.inc

.data?
tmpV dd ?

.data

.code

Start:

invoke AllocConsole   
invoke GetStdHandle, STD_OUTPUT HANDLE
invoke WriteConsole,eax, \
DTEXT(TxKonsola, "Everything work"), \
SIZEOF TxKonsola,OFS tmpV,NULL

invoke Sleep,20

invoke FreeConsole

invoke ExitProcess,1

END Start

pbrennick

lucky,
STD_OUTPUT HANDLE should be STD_OUTPUT_HANDLE

and you should have,
          option casemap:none
after the .model line.

This is necessary for windows.inc to function correctly.

I will test it further, but that is a start.

Paul

pbrennick

lucky,
TxKonsola needs to be declared.  What is DTEXT?

and

        includelib \masm32\lib\kernel32.lib
        includelib \masm32\lib\user32.lib

are missing.

lucky69

THX to You Joker for help and everything but it seems that I got to pass again - unluck and other things.Hope to back again for a while... :toothy


petezl

From what I can see of your descriptions, I think your problem might come from installing Masm32 in a non default folder. If your masm and asm file is in "C:\my_stuff\masm\konsola.asm" and your calling your includes from "include \masm32\include\" Then they won't be found!

Peter.
Cats and women do as they please
Dogs and men should realise it.