Re: undefined references to functions when linking
- From: stenasc@xxxxxxxxx
- Date: Wed, 13 Jun 2007 05:33:53 -0700
On Jun 12, 8:55 pm, "Joachim Schmitz" <nospam.j...@xxxxxxxxxxxxxxxxxx>
wrote:
<sten...@xxxxxxxxx> schrieb im Newsbeitragnews:1181672366.203975.284250@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Jun 12, 6:13 pm, "Joachim Schmitz" <nospam.j...@xxxxxxxxxxxxxxxxxx>
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???
Not without seeing the code...
Bye, Jojo- Hide quoted text -
- Show quoted text -
Hi All,
Got it sorted...had to rename a few functions and that cleared
everything up.
Many Thanks to all that replied
Bob
.
- 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
- Re: undefined references to functions when linking
- From: Joachim Schmitz
- undefined references to functions when linking
- Prev by Date: Re: Query:how to use windows api in my c source code?
- Next by Date: Re: Write to file
- Previous by thread: Re: undefined references to functions when linking
- Next by thread: Re: undefined references to functions when linking
- Index(es):
Relevant Pages
|
|