Compilation sous Linux fedora 10 x86-64
Acti
-
Char Snipeur Messages postés 10112 Statut Contributeur -
Char Snipeur Messages postés 10112 Statut Contributeur -
Bonjour,
Voila mon problème. Je travail en Jni et je ne comprends pas mon erreur: lorsque je crée la librairie "libTestJni.so" a partir de "TestJni.o" avec cette commande:
$ gcc -shared -o libTestJni.so -lcwiimote -lbluetooth -lm -I/usr/include/libcwiimote TestJni.o
L'erreur suivante apparait:
/usr/bin/ld: TestJni.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
TestJni.o: could not read symbols: Bad value
collect2: ld a retourné 1 code d'état d'exécution
J'essaye alors cette compilation:
$ gcc -fPIC -o libTestJni.so -lcwiimote -lbluetooth -lm -I/usr/include/libcwiimote TestJni.o
mais sans succes :
/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: ld a retourné 1 code d'état d'exécution
Pouvez-vous m'aider a comprendre mon erreur svp? Merci d'avance.
Voila mon problème. Je travail en Jni et je ne comprends pas mon erreur: lorsque je crée la librairie "libTestJni.so" a partir de "TestJni.o" avec cette commande:
$ gcc -shared -o libTestJni.so -lcwiimote -lbluetooth -lm -I/usr/include/libcwiimote TestJni.o
L'erreur suivante apparait:
/usr/bin/ld: TestJni.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
TestJni.o: could not read symbols: Bad value
collect2: ld a retourné 1 code d'état d'exécution
J'essaye alors cette compilation:
$ gcc -fPIC -o libTestJni.so -lcwiimote -lbluetooth -lm -I/usr/include/libcwiimote TestJni.o
mais sans succes :
/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: ld a retourné 1 code d'état d'exécution
Pouvez-vous m'aider a comprendre mon erreur svp? Merci d'avance.
A voir également:
- Compilation sous Linux fedora 10 x86-64
- Winrar 64 bits windows 10 - Télécharger - Compression & Décompression
- Clé windows 10 pro 64 bits gratuit - Guide
- Restauration systeme windows 10 - Guide
- Canon lbp 2900 driver windows 10 64-bit - Télécharger - Pilotes & Matériel
- Realtek audio driver windows 10 64-bit - Télécharger - Pilotes & Matériel