i have such text:
include setmacro.inc
__start
.data
text db "hehe",0
caption db "ewrwr",0
.code
start: invoke MessageBoxA, 0, addr text, addr caption, MB_OK
exit: __exit 0
end start
and setmacro.inc:
__start macro
.386
.model flat, stdcall
option casemap:none
include windows.inc
include kernel32.inc
include user32.inc
includelib kernel32.lib
includelib user32.lib
endm
__exit macro w1
invoke ExitProcess, w1
endm
when i type "go" in radasm it gives me 100 errors in kernel32.lib just like i type include instead includelib
but if i try to compile it from command line it compiles without any problem
who can help me?
if it my wrong or there something with radasm?
include setmacro.inc
__start
.data
text db "hehe",0
caption db "ewrwr",0
.code
start: invoke MessageBoxA, 0, addr text, addr caption, MB_OK
exit: __exit 0
end start
and setmacro.inc:
__start macro
.386
.model flat, stdcall
option casemap:none
include windows.inc
include kernel32.inc
include user32.inc
includelib kernel32.lib
includelib user32.lib
endm
__exit macro w1
invoke ExitProcess, w1
endm
when i type "go" in radasm it gives me 100 errors in kernel32.lib just like i type include instead includelib
but if i try to compile it from command line it compiles without any problem
who can help me?
if it my wrong or there something with radasm?
The only problem in compiling here (without radasm) was that I had to specify "\masm32\include\windows.inc" and so on.
so i do that in setmacro.inc
The __start macro is a prime example of a completely useless macro, what is the problem with simply declaring your includes directly without a macro at all, you can put them at the top of the setmacro.inc file if you wish. Using a macro to generate code is one thing but using it simply to issue mandatory processor directives is (sorry) nuts. You'll have to excuse me but most people here know what I think about macros in general and your __start macro demonstrates perfectly why I tend to feel that way.
yes i agree with u. that was stupid idea about __start macros, i dele it both (and _exit).