0

I have the following code:

include stdlib.a
includelib stdlib.lib

But on assembling, it gives me an error: "cannot open file : stdlib.a"

I haven't any file called "stdlib.lib" or "stdlib.a".

I've been searching for those files, but I can't find them. The only file I can find is "stdlib.h"(look Ramhound's answer), but WinAsm doesn't recognise it on compiling.

Is there any way to transform the "stdlib.h" to "stdlib.lib" or "stdlib.a", or to use in assembly? ( From Ramhound's answer : * "stdlib.h" is a header, not a library. It can't be converted to "stdlib.lib" or "stdlib.a" *).

Thanks!!!

EDIT 1 In Ramhound's answer, he explains that stdlib.h is a "header", not a library. Could someone help me with the stdlib.lib and stdlib.a ?

I've been looking for those files, but I can't find them. I would appreciate some help with those libraries. (Why every one have them but I can't find where to download them?

Gunner
  • 5,780
  • 2
  • 25
  • 40
AskPGSV
  • 1
  • 1
  • 1
  • stdlib.h is a header file it doens't contain any of the standard library code. Header files cannot be converted to .lib files. I suggest you do more research on how C/C++ programming works its not clear which your using in a case like this. – Security Hound Apr 05 '13 at 11:56
  • Thanks. I've researched on C and C++, but I can't find them. I'll keep looking for the libraries. – AskPGSV Apr 05 '13 at 13:32
  • Its not clear what compiler your using. There is a difference if your running this software on Windows or Unix/Linux. – Security Hound Apr 05 '13 at 15:48
  • OS: Windows 7 Assembler: WinAsam – AskPGSV Apr 05 '13 at 21:46

1 Answers1

0

WinASM is an IDE not an Assembler. Both include and includelib are MASM. If you want to use C functions, you need to link against Microsofts C Runtime - MSVCRT.dll. MASM32 contains the inc and import library:

include msvcrt.inc
includelib msvcrt.lib

The MASM32 import library prepends crt_ to the function names, so wscanf would be called crt_wscanf

Gunner
  • 5,780
  • 2
  • 25
  • 40
  • Perhaps coincidence, but both `stdlib.lib` (for Windows) and `stdlib.a` (for Linux) are part of the HLA package. I suspect that may be what you need. – Frank Kotler Apr 06 '13 at 04:00