News:

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

Include lib compiled in MS VC++!!!

Started by axus, June 05, 2006, 05:10:30 PM

Previous topic - Next topic

axus

How I can to join my MASM32 project lib static library compiled in MS VC++?
p.s. LIBC.LIB and OLDNAMES.LIB requied!!! And /NODEFEALTLIB don't help!!!

stanhebben

That shouldn't be hard to do. The masm libs and vc++ libs are in the same format.

You can copy libc.lib and oldnames.lib (which are in the vc++ libs directory) to the masm lib folder, and include them with includelib.

Then all you have to do is writing an assembly include file with the prototypes of your lib functions.

Stan

Vortex

axus,

I would suggest you to use msvcrt.lib , with libc.lib you can get sometimes a considerable increase in size in your final executable.

Here is a quick demo , it uses the static library masm32.lib

#include <string.h>

extern void __stdcall StdOut(char *);

int main(int argc,char *argv[])
{
char *szStr="Hello from MS VC++ Toolkit 2003";
StdOut(_strupr(szStr));
return 0;
}


Project builded with MS VC++ Toolkit 2003 :

cl /Zl /c /Ogtyb2 /Gs /G6 /Gz /FoDemo.OBJ Demo.c
link /SUBSYSTEM:CONSOLE Demo.obj crt0\crt0.lib kernel32.lib user32.lib masm32.lib msvcrt.lib

[attachment deleted by admin]

axus

Quote from: Vortex on June 05, 2006, 05:35:56 PM
axus,

I would suggest you to use msvcrt.lib , with libc.lib you can get sometimes a considerable increase in size in your final executable.

Here is a quick demo , it uses the static library masm32.lib

#include <string.h>

extern void __stdcall StdOut(char *);

int main(int argc,char *argv[])
{
char *szStr="Hello from MS VC++ Toolkit 2003";
StdOut(_strupr(szStr));
return 0;
}


Project builded with MS VC++ Toolkit 2003 :

cl /Zl /c /Ogtyb2 /Gs /G6 /Gz /FoDemo.OBJ Demo.c
link /SUBSYSTEM:CONSOLE Demo.obj crt0\crt0.lib kernel32.lib user32.lib masm32.lib msvcrt.lib


Thanks!!!