compilation avec arm-linux-gcc
Bonjour,
J'essaie de compiler le code suivant sous linux
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| include <stdlib.h>
#include <canlib.h>
void main(void)
{
canHandle h;
canInitializeLibrary();
h = canOpenChannel(0, canWANT_EXCLUSIVE);
if (h != canOK) {
char msg[64];
canGetErrorText(h, msg, sizeof(msg));
fprintf(stderr,
canOpenChannel failed (%s)\n, msg);
exit(1);
}
canSetBusParams(h, BAUD_250K, 0, 0, 0, 0, 0);
canSetOutputControl(h, canDRIVER_NORMAL);
canBusOn(h);
canWrite(h, 123, HELLO!, 6, 0);
canWriteSync(h, 500);
canBusOff(h);
canClose(h);
} |
avec gcc ça passe avec cette commande
Code:
gcc -lcanlib /home/makavelli/stage/kvaser/linuxcan/canlib/examples/writeloop.c -o kvazer -I /usr/include/
mais quand j'utilise un compilateur pour ARM avec la commande suivanteça ne passe pas
Code:
1 2 3
| [makavelli@fibonacci can_prog]$ arm-linux-gcc -lcanlib /home/makavelli/stage/kvaser/linuxcan/canlib/examples/writeloop.c -o kvazer -I /usr/lib/
/home/makavelli/stage/kvaser/linuxcan/canlib/examples/writeloop.c:59:20: erreur fatale: canlib.h : Aucun fichier ou dossier de ce type
compilation terminée. |