linking error

A

asit

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 ????

what should I do ???
 
I

Ian Collins

asit said:
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 ????

what should I do ???

Make sure you compile and link all the files you require. How you do
that is something to ask on a compiler or platform group.
 
A

Antoninus Twink

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.
 
A

asit

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.

thanx...it works to some extent
 
R

Richard Bos

asit said:
thanx...it works to some extent

That's nice. And when you want to know how you should _really_ do it, so
that it works better than "to some extent", ask in a newsgroup that
deals with your compiler, where you won't be given such half-baked
answers as the above.

Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top