Rockbox Development > Starting Development and Compiling

make sendfirm

(1/3) > >>

In the  directory ~/rockbox/utils/MTP$ I try to create sendfirm following the instructions. I write make but I get error 1. How can I fix this>

gcc  -Wall -lmtp -o sendfirm sendfirm.c
sendfirm.c: In function ‘sendfile_function’:
sendfirm.c:78:9: warning: implicit declaration of function ‘exit’ [-Wimplicit-function-declaration]
sendfirm.c:78:9: warning: incompatible implicit declaration of built-in function ‘exit’ [enabled by default]
sendfirm.c: In function ‘main’:
sendfirm.c:142:5: warning: incompatible implicit declaration of built-in function ‘exit’ [enabled by default]
/tmp/cchJ6DIx.o: In function `sendfile_function':
sendfirm.c:(.text+0x11d): undefined reference to `LIBMTP_new_file_t'
sendfirm.c:(.text+0x18e): undefined reference to `LIBMTP_Send_File_From_File'
sendfirm.c:(.text+0x1c0): undefined reference to `LIBMTP_Dump_Errorstack'
sendfirm.c:(.text+0x1cf): undefined reference to `LIBMTP_Clear_Errorstack'
sendfirm.c:(.text+0x1fa): undefined reference to `LIBMTP_destroy_file_t'
/tmp/cchJ6DIx.o: In function `main':
sendfirm.c:(.text+0x227): undefined reference to `LIBMTP_Init'
sendfirm.c:(.text+0x24a): undefined reference to `LIBMTP_Get_First_Device'
sendfirm.c:(.text+0x290): undefined reference to `LIBMTP_Release_Device'
collect2: error: ld returned 1 exit status
make: *** [sendfirm] Error 1

Do you have libmtp installed? The linker can't find it.

Edit:  The wiki lists the dependencies:

--- Quote ---The sendfirm utility is used to upgrade the firmware in an MTP device. It can be found in the utils/MTP directory in the Rockbox source tree; the Linux version requires both libusb and libmtp (and their development packages) to compile and use. This utility can be used from Linux and Windows.
For Linux: to compile, just type make in the utils/MTP directory.
For Windows: make sure you have MingW installed and type make sendfirm.exe in the utils/MTP directory (or download the binary here).

--- End quote ---

Thank you. Yes, I have both libusb and libmtp installed. Im stuck on this part. Any advice is greatly appreciated

Do you have the development packages too (so that would be a total of 4 packages not 2).

Yes, i do have all the packages installed in ubuntu


[0] Message Index

[#] Next page

Go to full version