UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Participant elaa82
Participant
3,143 Views
Registered: ‎02-13-2010

sdk compilation error with statement extern

hi friends...

i am getting compilation error for following statement.

 

//main.c

extern void sub_fun(void);//declared and defined other files(file.h, file.c). And files are added in project folder

int main();

{

sub_fun();//getting error for this statement

return 0;

}

 

Error is "undefined symbol sub_fun". tried with including header "file.h"... But the result is same.

how to fix it?any other way? using edk9.2.4i, virtex4, microblaze

thanks....

 

 

 

 

0 Kudos
3 Replies
Explorer
Explorer
3,127 Views
Registered: ‎11-26-2008

Re: sdk compilation error with statement extern

If that is your exact code, you should probably remove the semicolon after int main()...:)

0 Kudos
Participant elaa82
Participant
3,113 Views
Registered: ‎02-13-2010

Re: sdk compilation error with statement extern

no.. no..

it was a typing mistake...

anything else?

 

0 Kudos
Observer pupillo
Observer
3,108 Views
Registered: ‎08-10-2010

Re: sdk compilation error with statement extern

Hi,

I tried with edk 12.2. It compiles with no error.

In my sub.c there is just:

void sub_func(void)
{
 ......
}

 

In my test.c there is:

extern void sub_func(void);

main(...)

{

...

sub_func();

...

}

 

Check that you haven't use static or any strange modifier.

Check that there isn't any prototype of sub_func similar but not identical declared in any .h file

Pupillo

 

 

 

 

 

0 Kudos