News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

user32 build errors

Started by asmnoob32, January 02, 2014, 07:01:40 AM

Previous topic - Next topic

asmnoob32

Hi, I'm following Iczelion's Win32 Assembly Tutorials, and when I try to build the code on the second tutorial (http://win32assembly.programminghorizon.com/tut2.html), I get this error:

\masm32\lib\user32.lib(1) : error A2008: syntax error : !
\masm32\lib\user32.lib(2) : error A2044: invalid character in file
\masm32\lib\user32.lib(3) : error A2044: invalid character in file
\masm32\lib\user32.lib(4) : error A2044: invalid character in file
\masm32\lib\user32.lib(4) : error A2039: line too long
\masm32\lib\user32.lib(5) : error A2044: invalid character in file
\masm32\lib\user32.lib(6) : error A2044: invalid character in file
\masm32\lib\user32.lib(7) : error A2044: invalid character in file
\masm32\lib\user32.lib(8) : error A2044: invalid character in file
\masm32\lib\user32.lib(9) : error A2044: invalid character in file
\masm32\lib\user32.lib(10) : error A2044: invalid character in file
\masm32\lib\user32.lib(11) : error A2044: invalid character in file
\masm32\lib\user32.lib(12) : error A2044: invalid character in file
\masm32\lib\user32.lib(13) : error A2044: invalid character in file
\masm32\lib\user32.lib(14) : error A2044: invalid character in file
\masm32\lib\user32.lib(15) : error A2044: invalid character in file
\masm32\lib\user32.lib(16) : error A2044: invalid character in file
\masm32\lib\user32.lib(17) : error A2044: invalid character in file
\masm32\lib\user32.lib(18) : error A2044: invalid character in file
\masm32\lib\user32.lib(19) : error A2044: invalid character in file
\masm32\lib\user32.lib(20) : error A2044: invalid character in file
\masm32\lib\user32.lib(21) : error A2044: invalid character in file
\masm32\lib\user32.lib(22) : error A2044: invalid character in file
\masm32\lib\user32.lib(23) : error A2044: invalid character in file
\masm32\lib\user32.lib(24) : error A2044: invalid character in file
\masm32\lib\user32.lib(25) : error A2044: invalid character in file
\masm32\lib\user32.lib(26) : error A2044: invalid character in file
\masm32\lib\user32.lib(27) : error A2044: invalid character in file
\masm32\lib\user32.lib(28) : error A2044: invalid character in file
\masm32\lib\user32.lib(29) : error A2044: invalid character in file
\masm32\lib\user32.lib(30) : error A2044: invalid character in file
\masm32\lib\user32.lib(31) : error A2044: invalid character in file
\masm32\lib\user32.lib(32) : error A2044: invalid character in file
\masm32\lib\user32.lib(33) : error A2044: invalid character in file
\masm32\lib\user32.lib(34) : error A2044: invalid character in file
\masm32\lib\user32.lib(35) : error A2044: invalid character in file
\masm32\lib\user32.lib(36) : error A2044: invalid character in file
\masm32\lib\user32.lib(37) : error A2044: invalid character in file
\masm32\lib\user32.lib(38) : error A2044: invalid character in file
\masm32\lib\user32.lib(39) : error A2044: invalid character in file
\masm32\lib\user32.lib(40) : error A2044: invalid character in file
\masm32\lib\user32.lib(41) : error A2044: invalid character in file
\masm32\lib\user32.lib(42) : error A2044: invalid character in file
\masm32\lib\user32.lib(43) : error A2044: invalid character in file
\masm32\lib\user32.lib(44) : error A2044: invalid character in file
\masm32\lib\user32.lib(45) : error A2044: invalid character in file
\masm32\lib\user32.lib(46) : error A2044: invalid character in file
\masm32\lib\user32.lib(47) : error A2044: invalid character in file
\masm32\lib\user32.lib(48) : error A2044: invalid character in file
\masm32\lib\user32.lib(49) : error A2044: invalid character in file
\masm32\lib\user32.lib(50) : error A2044: invalid character in file
\masm32\lib\user32.lib(51) : error A2044: invalid character in file
\masm32\lib\user32.lib(52) : error A2044: invalid character in file
\masm32\lib\user32.lib(53) : error A2044: invalid character in file
\masm32\lib\user32.lib(54) : error A2044: invalid character in file
\masm32\lib\user32.lib(55) : error A2044: invalid character in file
\masm32\lib\user32.lib(56) : error A2044: invalid character in file
\masm32\lib\user32.lib(57) : error A2044: invalid character in file
\masm32\lib\user32.lib(58) : error A2044: invalid character in file
\masm32\lib\user32.lib(59) : error A2044: invalid character in file
\masm32\lib\user32.lib(60) : error A2044: invalid character in file
\masm32\lib\user32.lib(61) : error A2044: invalid character in file
\masm32\lib\user32.lib(62) : error A2044: invalid character in file
\masm32\lib\user32.lib(63) : error A2044: invalid character in file
\masm32\lib\user32.lib(64) : error A2044: invalid character in file
\masm32\lib\user32.lib(65) : error A2044: invalid character in file
\masm32\lib\user32.lib(66) : error A2044: invalid character in file
\masm32\lib\user32.lib(67) : error A2044: invalid character in file
\masm32\lib\user32.lib(68) : error A2044: invalid character in file
\masm32\lib\user32.lib(69) : error A2044: invalid character in file
\masm32\lib\user32.lib(70) : error A2044: invalid character in file
\masm32\lib\user32.lib(71) : error A2044: invalid character in file
\masm32\lib\user32.lib(72) : error A2044: invalid character in file
\masm32\lib\user32.lib(73) : error A2044: invalid character in file
\masm32\lib\user32.lib(74) : error A2044: invalid character in file
\masm32\lib\user32.lib(75) : error A2044: invalid character in file
\masm32\lib\user32.lib(76) : error A2044: invalid character in file
\masm32\lib\user32.lib(77) : error A2044: invalid character in file
\masm32\lib\user32.lib(78) : error A2044: invalid character in file
\masm32\lib\user32.lib(79) : error A2044: invalid character in file
\masm32\lib\user32.lib(80) : error A2044: invalid character in file
\masm32\lib\user32.lib(81) : error A2044: invalid character in file
\masm32\lib\user32.lib(82) : error A2044: invalid character in file
\masm32\lib\user32.lib(83) : error A2044: invalid character in file
\masm32\lib\user32.lib(84) : error A2044: invalid character in file
\masm32\lib\user32.lib(85) : error A2044: invalid character in file
\masm32\lib\user32.lib(86) : error A2044: invalid character in file
\masm32\lib\user32.lib(87) : error A2044: invalid character in file
\masm32\lib\user32.lib(88) : error A2044: invalid character in file
\masm32\lib\user32.lib(89) : error A2044: invalid character in file
\masm32\lib\user32.lib(90) : error A2044: invalid character in file
\masm32\lib\user32.lib(91) : error A2044: invalid character in file
\masm32\lib\user32.lib(92) : error A2044: invalid character in file
\masm32\lib\user32.lib(93) : error A2044: invalid character in file
\masm32\lib\user32.lib(94) : error A2044: invalid character in file
\masm32\lib\user32.lib(95) : error A2044: invalid character in file
\masm32\lib\user32.lib(96) : error A2044: invalid character in file
\masm32\lib\user32.lib(97) : error A2044: invalid character in file
\masm32\lib\user32.lib(98) : error A2044: invalid character in file
\masm32\lib\user32.lib(99) : error A2044: invalid character in file
\masm32\lib\user32.lib(100) : fatal error A1012: error count exceeds 100; stopping assembly


It looks like it's a problem with my user32.lib file. Here's the code I have:
.386
.model flat, stdcall
option casemap:none
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
includelib \masm32\lib\kernel32.lib
include \masm32\include\user32.inc
include \masm32\lib\user32.lib
.data
cap db "msgbox", 0
txt   db "aaa", 0
.code
start:
invoke MessageBox, NULL, addr txt, addr cap, MB_ICONERROR
    invoke ExitProcess,NULL
end start

dedndave

must be a typo

use INCLUDELIB to reference LIB files
use INCLUDE to reference INC files

fix this line
include \masm32\lib\user32.lib

dedndave

or, save yourself a lot of typing....
    include     \masm32\include\masm32rt.inc
.data
cap db "msgbox", 0
txt   db "aaa", 0
.code
start:
invoke MessageBox, NULL, addr txt, addr cap, MB_ICONERROR
    invoke ExitProcess,NULL
end start


masm32rt.inc has most of the ones you'll use
it's a plain text file, so you can open it with Notepad to see what's inside

Vortex

Hi asmnoob32,

Dave is right. The correct line is :

includelib \masm32\lib\user32.lib

asmnoob32

Look how dumb I am, it was just a simple brainfart on my part.

Thanks!

dedndave

Quotea simple brainfart on my part

very poetic   :P

Gunther

Hi asmnoob32,

welcome to the forum. Have fun.

Gunther
You have to know the facts before you can distort them.