public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Help! extern C linkage for thread entry functions
@ 2004-07-22 16:58 Giri Raja
  0 siblings, 0 replies; only message in thread
From: Giri Raja @ 2004-07-22 16:58 UTC (permalink / raw)
  To: ecos-discuss

Hi, 

I'm working on the EB40A board and my application is
in C++. Mine is a multi file application and I use a
common header file and include it in all my cc files.
I do have a #ifndef ... #define directive in my header
file to avoid multiple declarations. 

But still when I try to make it all, I get multiple
reference errors. But if the application is in C, the
whole thing compiles and works fine. 

I kind of figured that it is somewhat related to
declaring the thread entry functions within the extern
C block. But I'm not sure. How do I declare the thread
entry functions in C++. i.e if my thread function is
"Read_FIFO"  can I say

extern "C"  {
	cyg_thread_entry_t Read_FIFO;
}

or extern "C"  {
	void Read_FIFO(cyg_addrword_t );
}

In the first case I'm getting the multiple definition
erros, and in the second case I'm getting a conflict
with the previous declaration of
cyg_thread_entry_t Read_FIFO.

Can someone please help me. Thanks in advance. 

Giri.


	
		
__________________________________
Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!
http://advision.webevents.yahoo.com/yahoo/votelifeengine/

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-07-22 16:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-22 16:58 [ECOS] Help! extern C linkage for thread entry functions Giri Raja

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).