The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: axus on January 17, 2006, 04:21:46 PM

Title: Import lib, created Visual C++ 6.0, to MASM32
Post by: axus on January 17, 2006, 04:21:46 PM
If I try importing lib library, created Visual C++ 6.0, to MASM32 then show:
- I can't finded uuid.lib
- I can't finded libc.lib

Why? And may be it...
Title: Re: Import lib, created Visual C++ 6.0, to MASM32
Post by: hutch-- on January 17, 2006, 04:38:41 PM
These types of problems are usually path errors. What you also need is to prototype C functions in masm syntax for each library unless you wish to use push / call syntax.
Title: Re: Import lib, created Visual C++ 6.0, to MASM32
Post by: axus on January 17, 2006, 04:48:39 PM
Quote from: hutch-- on January 17, 2006, 04:38:41 PM
These types of problems are usually path errors. What you also need is to prototype C functions in masm syntax for each library unless you wish to use push / call syntax.

I am write function in formatted __stdcall!!!
But lib needed uuid.lib, libc.lib!
Title: Re: Import lib, created Visual C++ 6.0, to MASM32
Post by: hutch-- on January 18, 2006, 12:28:29 AM
If you are calling C library functions from MASM code you need to prototype them appropriately so with C calling convention functions they are basically done like this.

FuncName PROTO C :DWORD,:DWORD,:VARARG


The UUID lib may be a different matter, it sounds like it may have a COM interface and MASM does not have a built in method of doing this. If this is the case you would need to have a good look at Ernie Murphy's work or later work by an author known as ByteRider. Both are well done.
Title: Re: Import lib, created Visual C++ 6.0, to MASM32
Post by: Mincho Georgiev on January 18, 2006, 05:28:06 PM
As a matter of fact, the static library that i've been posted a week ago : http://www.masmforum.com/simple/index.php?topic=3613.0
have that kind of behaviour, cause it's core was C++ OOP coded. There is some cmd line options for the linker that may resolve your problem (if you already did what Hutch is talking about offcource). First of all, try to link your program from the cmd line (not IDE) so you can add the options by yourself. Try to link your App's obj with uuid.lib and libc.lib. If that didn't work ,then use the '/NODEFAULTLIB: / ' option of the linker and last of all, try to link with msvcrt.lib (only if the other variants didn't work).