News:

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

Link Question

Started by RotateRight, July 01, 2006, 07:43:11 PM

Previous topic - Next topic

RotateRight

[]

TNick

Why not like this?

include MyFile.inc



;-----MyFile.inc---------------------------------
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\user32.lib
includelib \masm32\lib\MyLib.lib


Mark Jones

Indeed Mark, sometimes for clarity a "MyFile.inc" file is made alongside the .asm file which contains all the includes, data, etc. Then only this "MyFile.inc" is included from the main .asm file, which then itself includes all the other files.

Note that MASM32 v8 and newer contains a "master" include file for most standard Windows functions, take a look inside \masm32\include\masm32rt.inc. If you include that first in your list of includes, then you can omit any of its contents in your own code. (i.e. the first three startup lines, including windows.inc, kernel32.lib, etc.) This helps to keep things nice and tidy.
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

RotateRight

#3
[]

sinsi

I use one file called win32.lib which contains the usual libs (kernel32, user32 etc.).
Command is LINK /lib /out:MyLib.lib kernel32.lib user32.lib ...etc
Light travels faster than sound, that's why some people seem bright until you hear them.

Mark Jones

Quote from: RotateRight on July 01, 2006, 10:30:34 PM
However, this is not what I'm trying to accomplish.
What I want is the ability to link with one file.

That file name should be MyLib.lib and it should
include what is needed so that I do not get link
errors because of ExitProcess and MessageBoxA.

Hi Mark. Sorry for asking for more clarity but there is still a lot of ambiguity here. Did you want to make an app which can be recompiled without the rest of the MASM32 package, or are you just looking to reduce the long list of includes to one .inc and .lib pair for aesthetic reasons? Perhaps you can post some of the code for us to better understand your question.
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

RotateRight

#6
[]