I am using “The Art and Science of C” to learn C.If you want to write a program,you need to use his lib.I download it but i don't konw how to link it..
Here is my settings:
1.create a new project and select all .h & .c files from "standard" folder
2.build it ---- successful
3.open an example c source file(add2.c)
#include <stdio.h>
#include "genlib.h"
#include "simpio.h"
main()
{
int n1, n2, total;
printf("This program adds two numbers.\n");
printf("1st number? ");
n1 = GetInteger();
printf("2nd number? ");
n2 = GetInteger();
total = n1 + n2;
printf("The total is %d.\n", total);
}
4.bulid it,then it has an messages.
\programs\03-Problem-Solving\add10.c|11|error: genlib.h: No such file or directory|
\programs\03-Problem-Solving\add10.c|12|error: simpio.h: No such file or directory|
||=== Build finished: 2 errors, 0 warnings ===|
5.What can i do if i want to link this lib?I search the internet and view all the topics that related to this topic,but i still don't know how to link it..orz.
PS:Settings--Global xxx---Linker Settings--add the .a files . it can't work.
6.
Code::Blocks version:10.05
Complier:GCC
OS:Windows XP SP3
You can download this source from
http://www.rayfile.com/files/fb21770c-f64b-11df-90bb-0015c55db73d/