Bonjour,
J'ai un fichier toto.c avec
Un fichier toto.h avecCode:
1
2
3
4 void listeUsb( void ) { blablabla }
Et un fichier go.c avec:Code:void listeUsb( void );
Je compile avecCode:
1
2
3
4
5
6
7 include "toto.h" int main ( int argc, char** argv ) { listeUsb(); return( 0 ) }
Il me genere toto.oCode:gcc toto.c -c -o toto.o -L/usr/X11R6/lib -I/usr/local/include
puis:
Et le il me dit:Code:gcc go.c toto.o -o go -L/usr/X11R6/lib -I/usr/local/include -lX11 -lglut -lGL -lusb
Undefined reference to "listeUsb"
Ma question: pourquoi ? Il devrait le trouver dans toto.o ?
Merci de votre aide !
Cordialement.