Integration de LibUsb dans une appli

GenoseGenose Membre
Salut,


je tente désespérément de compiler le projet :

http://libusb.sourceforge.net/

avec ProjectBuilder, et a dire que ca fonctionne n'est pas exact, laos que avec GCC et un ./configure tout fonctionne bien et meme que l'on peut ensuite utiliser le binary ainsi compiler pour faire des tests.

voici ce que me donne une compilation avec exactement le meme ordre de passage dans projectBuilder:
(j'ai enlever le path de mes partitions pour le post forum)

Building target “usb lib 0.1.8” with build style “Development” (optimization:level ‘0', debug-symbols:on) " (43 errors, 1 warning)<br />       &nbsp; &nbsp; /usr/bin/gcc3&nbsp; -c -F&quot;//Users/sil_am_proj/FDTI USB Tester/build&quot;&nbsp; -I&quot;//Users/sil_am_proj/FDTI USB Tester/build/include&quot; -Ilibusb-0.1.8&nbsp; -arch ppc -fno-common -fpascal-strings -O0 -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -pipe &quot;-fmessage-length=0&quot; -mdynamic-no-pic -g -precomp-trustfile &quot;//Users/sil_am_proj/FDTI USB Tester/build/FDTI USB Tester.build/usb lib 0.1.8.build/TrustedPrecomps.txt&quot; &quot;-Wp,-header-mapfile,//Users/sil_am_proj/FDTI USB Tester/build/FDTI USB Tester.build/usb lib 0.1.8.build/usb lib 0.1.8.hmap&quot;&nbsp; &nbsp; &nbsp;  libusb-0.1.8/darwin.c&nbsp; -o &quot;//Users/sil_am_proj/FDTI USB Tester/build/FDTI USB Tester.build/usb lib 0.1.8.build/Objects-normal/ppc/darwin.o&quot; <br />libusb-0.1.8/darwin.c:64: warning: #warning &quot;libusb being compiled for 10.2 or higher&quot;<br />libusb-0.1.8/darwin.c:229: illegal function call, found `,darwin_error_str&#39;<br />libusb-0.1.8/darwin.c:277: illegal function call, found `,darwin_error_str&#39;<br />libusb-0.1.8/darwin.c:318: illegal function call, found `,darwin_error_str&#39;<br />libusb-0.1.8/darwin.c:347: illegal function call, found `,darwin_error_str&#39;<br />libusb-0.1.8/darwin.c:373: illegal function call, found `,darwin_error_str&#39;<br />libusb-0.1.8/darwin.c:377: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />libusb-0.1.8/darwin.c:394: illegal function call, found `,darwin_error_str&#39;<br />libusb-0.1.8/darwin.c:407: illegal function call, found `,darwin_error_str&#39;<br />libusb-0.1.8/darwin.c:420: illegal function call, found `,darwin_error_str&#39;<br />libusb-0.1.8/darwin.c:436: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />libusb-0.1.8/darwin.c:458: illegal function call, found `,darwin_error_str&#39;<br />libusb-0.1.8/darwin.c:471: illegal function call, found `,darwin_error_str&#39;<br />libusb-0.1.8/darwin.c:486: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />libusb-0.1.8/darwin.c:489: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />libusb-0.1.8/darwin.c:499: illegal function call, found `,darwin_error_str&#39;<br />libusb-0.1.8/darwin.c:521: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />libusb-0.1.8/darwin.c:524: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />libusb-0.1.8/darwin.c:532: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />libusb-0.1.8/darwin.c:558: illegal function call, found `,darwin_error_str&#39;<br />libusb-0.1.8/darwin.c:564: illegal function call, found `,darwin_error_str&#39;<br />libusb-0.1.8/darwin.c:588: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />libusb-0.1.8/darwin.c:593: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />libusb-0.1.8/darwin.c:616: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />libusb-0.1.8/darwin.c:627: illegal function call, found `,darwin_error_str&#39;<br />libusb-0.1.8/darwin.c:676: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />libusb-0.1.8/darwin.c:702: illegal function call, found `,darwin_error_str&#39;<br />libusb-0.1.8/darwin.c:731: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />libusb-0.1.8/darwin.c:734: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />libusb-0.1.8/darwin.c:738: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />libusb-0.1.8/darwin.c:741: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />libusb-0.1.8/darwin.c:758: illegal function call, found `,ep&#39;<br />libusb-0.1.8/darwin.c:769: illegal function call, found `,ep&#39;<br />libusb-0.1.8/darwin.c:777: illegal function call, found `,ep&#39;<br />libusb-0.1.8/darwin.c:826: illegal function call, found `,darwin_error_str&#39;<br />libusb-0.1.8/darwin.c:874: illegal function call, found `,darwin_error_str&#39;<br />libusb-0.1.8/darwin.c:971: illegal function call, found `,darwin_error_str&#39;<br />libusb-0.1.8/darwin.c:1083: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />libusb-0.1.8/darwin.c:1091: illegal function call, found `,darwin_error_str&#39;<br />libusb-0.1.8/darwin.c:1110: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />libusb-0.1.8/darwin.c:1118: illegal function call, found `,darwin_error_str&#39;<br />libusb-0.1.8/darwin.c:1135: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />libusb-0.1.8/darwin.c:1140: illegal function call, found `,darwin_error_str&#39;<br />cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode<br />&lt;built-in&gt;:1:1: no macro name given in #define directive<br />                libusb-0.1.8/darwin.c:64: warning: #warning &quot;libusb being compiled for 10.2 or higher&quot;<br />          libusb-0.1.8/darwin.c:229: illegal function call, found `,darwin_error_str&#39;<br />          libusb-0.1.8/darwin.c:277: illegal function call, found `,darwin_error_str&#39;<br />          libusb-0.1.8/darwin.c:318: illegal function call, found `,darwin_error_str&#39;<br />          libusb-0.1.8/darwin.c:347: illegal function call, found `,darwin_error_str&#39;<br />          libusb-0.1.8/darwin.c:373: illegal function call, found `,darwin_error_str&#39;<br />          libusb-0.1.8/darwin.c:377: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />            libusb-0.1.8/darwin.c:394: illegal function call, found `,darwin_error_str&#39;<br />          libusb-0.1.8/darwin.c:407: illegal function call, found `,darwin_error_str&#39;<br />          libusb-0.1.8/darwin.c:420: illegal function call, found `,darwin_error_str&#39;<br />          libusb-0.1.8/darwin.c:436: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />            libusb-0.1.8/darwin.c:458: illegal function call, found `,darwin_error_str&#39;<br />          libusb-0.1.8/darwin.c:471: illegal function call, found `,darwin_error_str&#39;<br />          libusb-0.1.8/darwin.c:486: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />            libusb-0.1.8/darwin.c:489: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />            libusb-0.1.8/darwin.c:499: illegal function call, found `,darwin_error_str&#39;<br />          libusb-0.1.8/darwin.c:521: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />            libusb-0.1.8/darwin.c:524: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />            libusb-0.1.8/darwin.c:532: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />            libusb-0.1.8/darwin.c:558: illegal function call, found `,darwin_error_str&#39;<br />          libusb-0.1.8/darwin.c:564: illegal function call, found `,darwin_error_str&#39;<br />          libusb-0.1.8/darwin.c:588: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />            libusb-0.1.8/darwin.c:593: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />            libusb-0.1.8/darwin.c:616: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />            libusb-0.1.8/darwin.c:627: illegal function call, found `,darwin_error_str&#39;<br />          libusb-0.1.8/darwin.c:676: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />            libusb-0.1.8/darwin.c:702: illegal function call, found `,darwin_error_str&#39;<br />          libusb-0.1.8/darwin.c:731: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />            libusb-0.1.8/darwin.c:734: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />            libusb-0.1.8/darwin.c:738: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />            libusb-0.1.8/darwin.c:741: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />            libusb-0.1.8/darwin.c:758: illegal function call, found `,ep&#39;<br />                libusb-0.1.8/darwin.c:769: illegal function call, found `,ep&#39;<br />                libusb-0.1.8/darwin.c:777: illegal function call, found `,ep&#39;<br />                libusb-0.1.8/darwin.c:826: illegal function call, found `,darwin_error_str&#39;<br />          libusb-0.1.8/darwin.c:874: illegal function call, found `,darwin_error_str&#39;<br />          libusb-0.1.8/darwin.c:971: illegal function call, found `,darwin_error_str&#39;<br />          libusb-0.1.8/darwin.c:1083: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />           libusb-0.1.8/darwin.c:1091: illegal function call, found `,darwin_error_str&#39;<br />         libusb-0.1.8/darwin.c:1110: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />           libusb-0.1.8/darwin.c:1118: illegal function call, found `,darwin_error_str&#39;<br />         libusb-0.1.8/darwin.c:1135: only 2 args to macro &#39;USB_ERROR_STR&#39; (3 expected)<br />           libusb-0.1.8/darwin.c:1140: illegal function call, found `,darwin_error_str&#39;<br />         &lt;built-in&gt;:1:1: no macro name given in #define directive<br />

ce sont des macro pour la plupart qui ne sont plus reconnu !!! etrange non !!!

si quelqu'un aurait deja reussi a compiler avec Xcode ou Project Builder ce projet ou une autre idee pour assembler le binarie de GCC produit dans le terminal, je suis a votre ecoute.

a bientot.

Réponses

  • nucleusnucleus Membre
    15:45 modifié #2
    dans 1091191360:
    avec GCC et un ./configure tout fonctionne bien et meme que l'on peut ensuite utiliser le binary ainsi compiler pour faire des tests.


    Le ./configure detecte l'OS, les librairies installées, etc.. et génère les fichiers nécessaires pour compiler l'application correctement sur l'environement courant..
    Tu trouvera probablement la réponse dans ces fichiers générés (Makefile, fichiers .h)..
  • GenoseGenose Membre
    15:45 modifié #3
    merci a toi nucleus
Connectez-vous ou Inscrivez-vous pour répondre.