Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipadcharge build failure Debian Wheezy #39

Open
kirrus opened this issue Feb 8, 2015 · 2 comments
Open

ipadcharge build failure Debian Wheezy #39

kirrus opened this issue Feb 8, 2015 · 2 comments

Comments

@kirrus
Copy link

kirrus commented Feb 8, 2015

Hi,

The changes in commit bb24e1c cause compilation to fail on Debian Wheezy;

kirrus@MrsCake:~/development/ipad_charge$ make
gcc -Wall -Wextra ipad_charge.c -lusb-1.0 -o ipad_charge
ipad_charge.c: In function ‘set_charging_mode’:
ipad_charge.c:38:3: warning: implicit declaration of function ‘libusb_strerror’ [-Wimplicit-function-declaration]
ipad_charge.c:38:3: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘int’ [-Wformat]
ipad_charge.c:44:3: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘int’ [-Wformat]
ipad_charge.c:54:3: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘int’ [-Wformat]
ipad_charge.c: In function ‘main’:
ipad_charge.c:153:5: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘int’ [-Wformat]
/tmp/cc3F3dOB.o: In function `set_charging_mode':
ipad_charge.c:(.text+0x54): undefined reference to `libusb_strerror'
ipad_charge.c:(.text+0xbc): undefined reference to `libusb_strerror'
ipad_charge.c:(.text+0x152): undefined reference to `libusb_strerror'
/tmp/cc3F3dOB.o: In function `main':
ipad_charge.c:(.text+0x528): undefined reference to `libusb_strerror'
collect2: error: ld returned 1 exit status  
make: *** [ipad_charge] Error 1

Building from 3088eba succeeded.

@kirrus kirrus changed the title ipadcharge build conflicts ipadcharge build failure Debian Wheezy Feb 8, 2015
@kirrus
Copy link
Author

kirrus commented Feb 8, 2015

The libusb packages I have installed:

ii  libusb-0.1-4:amd64                       2:0.1.12-20+nmu1                   amd64        userspace USB programming library
ii  libusb-1.0-0:amd64                       2:1.0.11-1                         amd64        userspace USB programming library
ii  libusb-1.0-0-dev                         2:1.0.11-1                         amd64        userspace USB programming library development files
ii  libusb-dev                               2:0.1.12-20+nmu1                   amd64        userspace USB programming

@xmlyqing00
Copy link

I think you could remove the sentence including the "libusb_strerror" in the C file and try again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants