Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » unable to call routines from another module
unable to call routines from another module [message #149993] Tue, 26 July 2005 04:09 Go to next message
Eclipse UserFriend
Originally posted by: stephane.davy.obspm.fr

Hello all,
I would like to use a routine which is defined in another file that the
calling file, for example:

application.c:

#include "dsp.h"
display_msg();


dsp.h:

void display_msg(void);


dsp.c:

void display_msg() { printf("Hello from dsp.c");

But when I compile, I get the following error:
Severity Description Resource In Folder Location Creation Time
2 undefined reference to `display_msg' sorbet.c SORBET line 479 July 26,
2005 10:07:34 AM


Thanks for help !!
Maybe this come from my compiler ? Or do I have to specify something in
Eclipse ?

Regards,

Stéphane Davy

PS: my compiler is sparc-elf-gcc for LEON SPARC processor.
Re: unable to call routines from another module [message #150032 is a reply to message #149993] Tue, 26 July 2005 09:36 Go to previous message
Eclipse UserFriend
It's your compiler.

JC

Stéphane Davy wrote:
> Hello all,
> I would like to use a routine which is defined in another file that the
> calling file, for example:
>
> application.c:
>
> #include "dsp.h"
> display_msg();
>
>
> dsp.h:
>
> void display_msg(void);
>
>
> dsp.c:
>
> void display_msg() { printf("Hello from dsp.c");
>
> But when I compile, I get the following error:
> Severity Description Resource In Folder Location Creation
> Time
> 2 undefined reference to `display_msg' sorbet.c SORBET line
> 479 July 26, 2005 10:07:34 AM
>
>
> Thanks for help !!
> Maybe this come from my compiler ? Or do I have to specify something in
> Eclipse ?
>
> Regards,
>
> Stéphane Davy
>
> PS: my compiler is sparc-elf-gcc for LEON SPARC processor.
>
Previous Topic:simple task- switching header/source
Next Topic:"file not indexed because it was not built" errors
Goto Forum:
  


Current Time: Thu Jul 17 04:55:10 EDT 2025

Powered by FUDForum. Page generated in 0.56790 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top