The MASM Forum

General => The Campus => Topic started by: edguimakit on December 03, 2012, 08:01:08 PM

Title: \masm32\include\windows.inc(118) : error A2005: symbol redefinition : CHAR
Post by: edguimakit on December 03, 2012, 08:01:08 PM
Hi Guys,

I m using masm32 in win xp  and with a simple test project gte this  error. please help me!

code:
***************************************

.386
.model flat, stdcall
option casemap :none

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

include \masm32\lib\masm32.lib
include \masm32\lib\windows.lib
include \masm32\lib\kernel32.lib


.data
        Demo db "demo", 0

.code
start:

   invoke StdOut, addr Demo
   invoke ExitProcess,0

end start

***************************************

ml /c /coff hellomasm32.asm

error:
***************************************

\masm32\include\windows.inc(118) : error A2005: symbol redefinition : CHAR
\masm32\lib\masm32.lib(1) : error A2008: syntax error : !
\masm32\lib\masm32.lib(2) : error A2044: invalid character in file
\masm32\lib\masm32.lib(3) : error A2044: invalid character in file

***************************************

Title: Re: \masm32\include\windows.inc(118) : error A2005: symbol redefinition : CHAR
Post by: Dubby on December 03, 2012, 08:50:00 PM
Quote from: edguimakit on December 03, 2012, 08:01:08 PM

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

include \masm32\lib\masm32.lib
include \masm32\lib\windows.lib
include \masm32\lib\kernel32.lib


Should be:
include \masm32\include\windows.inc ; windows.inc always goes 1st
include \masm32\include\masm32.inc
include \masm32\include\kernel32.inc

use "includelib" for lib files
includelib \masm32\lib\masm32.lib
;includelib \masm32\lib\windows.lib ; no such file
includelib \masm32\lib\kernel32.lib

hope this help..  :t
Title: Re: \masm32\include\windows.inc(118) : error A2005: symbol redefinition : CHAR
Post by: MichaelW on December 03, 2012, 09:55:41 PM
See \masm32\include\masm32rt.inc for the correct syntax and order, or just replace everything from .386 through the includelib statements with:

include \masm32\include\masm32rt.inc

Title: Re: \masm32\include\windows.inc(118) : error A2005: symbol redefinition : CHAR
Post by: edguimakit on December 03, 2012, 10:37:11 PM
tnks Guys,

problem solved.

:biggrin: :biggrin: :biggrin: