News:

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

1000's of errors i dont get it

Started by elbibvin, December 30, 2008, 02:29:01 AM

Previous topic - Next topic

elbibvin

Hello all from elb,
  I have just started asm and i am a noob noob so any help will be apreciated. I am using MASM32 on windows vista home premium. After finding iczelion's tuts i tried to do the first one (code below)

.386
.model flat, stdcall
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
includelib \masm32\lib\kernel32.lib
.data
.code
start:
    invoke ExitProcess,0
end start

problem is when i try to assemble it i actually get over 100 errors which causes the assembly to stop i have listed the first few below. If anyone can help i will be very greatfull

Assembling: C:\Users\Gary\Desktop\MsgBox.asm
\masm32\include\windows.inc(129) : error A2004: symbol type conflict : bool
\masm32\include\windows.inc(7804) : error A2179: structure improperly initialized
\masm32\include\windows.inc(7804) : error A2008: syntax error : in structure
\masm32\include\windows.inc(8711) : error A2179: structure improperly initialized
\masm32\include\windows.inc(8711) : error A2008: syntax error : in structure
\masm32\include\windows.inc(8724) : error A2179: structure improperly initialized
\masm32\include\windows.inc(8724) : error A2008: syntax error : in structure


donkey

I didn't have MASM on my system so I did a fresh install and copied and pasted your code with only path modifications for the inc and libs. I got absolutely no errors during the build...

.386
.model flat, stdcall
include C:\programming\masm32\include\windows.inc
include C:\programming\masm32\include\kernel32.inc
includelib C:\programming\masm32\lib\kernel32.lib
.data
.code
start:
    invoke ExitProcess,0
end start


C:\Programming\Masm32\Bin\ML.EXE /c /coff /Cp /I"C:\Programming\Masm32\Include" "testforboard.asm"
Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997.  All rights reserved.

Assembling: testforboard.asm
C:\Programming\Masm32\Bin\LINK.EXE /SUBSYSTEM:WINDOWS /RELEASE /VERSION:4.0 /LIBPATH:"C:\Programming\Masm32\Lib" /OUT:"testforboard.exe" "testforboard.obj"
Microsoft (R) Incremental Linker Version 5.12.8078
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.


Make finished.
Total compile time 562 ms


Could you post the command lines used to assemble and link the project ?
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

elbibvin

thanks guys for the info the "option casemap:none" line did the trick. when i added that it assembled without errors. BTW Donkey i was assembling from qedit im not sure if that really answers your question to me though.

MichaelW

elb,

The problem is that Windows.inc depends on the internal symbol recognition being case sensitive. For example, the first error being reported is because without case sensitivity 'bool' and 'BOOL' are recognized as the same symbol, but in windows.inc they are defined differently:

bool                        typedef BYTE
BOOL                        typedef DWORD


And the solution is, as you apparently found, to add an option casemap :none statement above the include statements:

    .486                                ; create 32 bit code
    .model flat, stdcall                ; 32 bit memory model
    option casemap :none                ; case sensitive
 
    include \masm32\include\windows.inc
    include \masm32\include\masm32.inc
    ...

eschew obfuscation

donkey

Quote from: elbibvin on December 30, 2008, 03:28:01 AM
thanks guys for the info the "option casemap:none" line did the trick. when i added that it assembled without errors. BTW Donkey i was assembling from qedit im not sure if that really answers your question to me though.

Yeah, that would do it. /Cp in the command line has the same effect.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable