libctiny.lib
From: George Hester (hesterloli_at_hotmail.com)
Date: 01/16/05
- Next message: George Hester: "Re: switch(){ case arg{}} why?"
- Previous message: TanKC: "Re: Creating callbacks ..."
- Next in thread: Michael K. O'Neill: "Re: libctiny.lib"
- Reply: Michael K. O'Neill: "Re: libctiny.lib"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 16 Jan 2005 03:30:20 -0500
Please take a look at this page:
http://msdn.microsoft.com/msdnmag/issues/01/01/hood/default.aspx
I made his libctiny.lib because I was aghast that this c program:
#define EOF -1
#define PROMPT ':'
#define exit return /* UNIX Fix */
main(){
float a, b;
char opr;
float result;
while (putchar(PROMPT), scanf("%f%c%f", &a, &opr, &b) != EOF){ /* EOF = ctrl-z */
switch(opr){
case '+': result = a+b; break;
case '-': result = a-b; break;
case '*': result = a*b; break;
case '/': result = a/b; break;
default:
printf("ERROR **** illegal operator\n");
printf("Legal characters are +, -, * and /;");
printf(" Try again\n");
continue;
}
printf("result is %g\n", result);
}
printf("See ya");
exit(0);
}
was 56KB.
But when I tried his libctiny.lib like this:
cl /o1 SimpleCalculator.c /link /NODEFAULT:libc.lib libctiny.lib
I got three errors:
SimpleCalculator.obj : error LNK2001: unresolved external symbol _scanf
SimpleCalculator.obj : error LNK2001: unresolved external symbol _putchar
SimpleCalculator.obj : error LNK2001: unresolved external symbol _fltused
What this tells me is his libctiny.lib is really tiny. So tiny it doesn't have what is necessary for my program. Is
that right?
-- George Hester _________________________________
- Next message: George Hester: "Re: switch(){ case arg{}} why?"
- Previous message: TanKC: "Re: Creating callbacks ..."
- Next in thread: Michael K. O'Neill: "Re: libctiny.lib"
- Reply: Michael K. O'Neill: "Re: libctiny.lib"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|