Bonjour,

Je suis sous Windows XP avec Eclipse + gcc.

Dans un fichier en C, j'appelle une fonction d'un fichier en Cpp.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
 
typedef void (*thread_callback_t)(void);
extern thread_t thread_start(thread_callback_t tk, unsigned char priority);
 
extern void thread_automat(void);
 
int main(void)
{
    ....
    thread_start(thread_automat, 10);
}
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
extern "C" void thread_automat(void)
{
}
Dans le fichier cpp, j'ai:

référence indéfinie vers « thread_automat »
Or ceci link avec CodeBlocks qui utilise également gcc !

C'est curieux.

Merci