On 9 Oct 2008 at 7:03, asit wrote:
I have downloaded some header files with is corresponding c files. I
put them all in a single directory(bin ) and with my own code using
fuctions declared in header file and defined in that C file, I
compiled it.
But after this when I build the exe(I am using XP), I am getting
linker errors ????
Compile each .c file to a .o file (possibly .obj on MS Windows). When
you link the program, tell the linker about each .o file you need to
link with.
If you're compiling on the command line, you can probably just pass all
the .o files as arguments. If you're using an IDE, there's probably a
notion of "Project" where you can put together lots of .c files to make
a single program, and there may be a "Project options" menu where you
can specify how to link things.
If you're having trouble, you need to mention which IDE you're using -
there'll be people here who ca answer questions about any common IDE,
but they are all slightly different so you need to specify the one
you're using.