Re: undefined references to functions when linking
- From: "Joachim Schmitz" <nospam.jojo@xxxxxxxxxxxxxxxxxx>
- Date: Tue, 12 Jun 2007 21:55:35 +0200
<stenasc@xxxxxxxxx> schrieb im Newsbeitrag
news:1181672366.203975.284250@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Jun 12, 6:13 pm, "Joachim Schmitz" <nospam.j...@xxxxxxxxxxxxxxxxxx>Not without seeing the code...
wrote:
<sten...@xxxxxxxxx> schrieb im
Newsbeitragnews:1181667898.243965.188770@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Hi,
In a file test1.c, in have the two functions f1 and f2. These are
declared in the header file t1.h. I want to call these functions in
another file subprog.c, which contains the function call_funcs. I have
included the header file t1.h in subprog.c. Using gcc, I can compile
and get subprog.o without any problems.
However, when I try to link subprog.o into the main application, I get
the errors
In function call_funcs undefined reference to f1
In function call_funcs undefined reference to f2
Anybody have any idea what could be causing this.
You need to compile test1.c too and link the resulting .o with the
subprog.o.
Bye, Jojo
Thanks Jojo...that fixed it...I now get multiple definition
errors...you don't know how to solve that???
Bye, Jojo
.
- Follow-Ups:
- Re: undefined references to functions when linking
- From: stenasc
- Re: undefined references to functions when linking
- References:
- undefined references to functions when linking
- From: stenasc
- Re: undefined references to functions when linking
- From: Joachim Schmitz
- Re: undefined references to functions when linking
- From: stenasc
- undefined references to functions when linking
- Prev by Date: Re: How many levels of pointers can you have?
- Next by Date: Re: cast struct question
- Previous by thread: Re: undefined references to functions when linking
- Next by thread: Re: undefined references to functions when linking
- Index(es):
Relevant Pages
|
|