Topic : external declaration. (how to)

Forum : Ride IDE

Original Post
Post Information Post
May 27, 2009 - 10:02am
Guest

Hi to everybody!

I'm a "first time" user of the RINE and GNU compiler and probably it is a very simple issue but, here it goes:
How can I use a function declared in other module?
In the past I used to do the following:

..............................................................................
(For example in MODULE_1.C)

void Ini_micro (void)
{
.
.
.
}

..............................................................................
(And in MODULE_2.C)

extern void Ini_micro (void);

void main ()
{
Ini_micro ();
}

..............................................................................
If I do this, it looks like the line with the 'extern' is ignored and Ride tells me that: " undefined reference to `Ini_micro' "

Thanks a lot to all !!

Replies
Post Information Post
+1
0
-1
May 27, 2009 - 4:57pm
Guest

Hi

I tried what you described but it compiled.
If this error exists it should be very easy to reproduce.
So may iu ask you to make a little project showing this issue and send it to
Let us know what is your software version.

Regards,
Matloub