Code Monkey home page Code Monkey logo

Comments (3)

hanwen avatar hanwen commented on August 12, 2024

Looks like you have to install libusb1-dev or whatever it is called on
debian squeeze.

On Fri, Mar 8, 2013 at 5:49 AM, vavoli [email protected] wrote:

Hi,

I was able to connect my samsung galaxy S 3 lte and with udev I can mount
and umount (both auto) with normal user. I've download go-mtpfs binary from
your site. I wasn't able to compile your package cause the following errors:

go install github.com/hanwen/go-mtpfs
github.com/hanwen/go-mtpfs/usb

error: 'libusb_error_name' undeclared (first use in this function)
error: (Each undeclared identifier is reported only once
error: 'LIBUSB_SPEED_SUPER' undeclared (first use in this function)
error: 'LIBUSB_SPEED_LOW' undeclared (first use in this function)
error: 'libusb_get_device_speed' undeclared (first use in this function)
error: 'LIBUSB_SPEED_UNKNOWN' undeclared (first use in this function)
error: 'LIBUSB_SPEED_HIGH' undeclared (first use in this function)
error: 'LIBUSB_SPEED_FULL' undeclared (first use in this function)

hear is my usb-go (relevant lines)

// The usb package is a straighforward cgo wrapping of the libusb 1.0
// API. It only supports the synchronous API, since Goroutines can be
// used for asynchronous use-cases.

package usb

// #cgo LDFLAGS: -lusb-1.0
// #cgo CFLAGS: -I/usr/include/libusb-1.0
// #include
import "C"

import (
"fmt"
"reflect"
"unsafe"
)

const SPEED_UNKNOWN = C.LIBUSB_SPEED_UNKNOWN
const SPEED_LOW = C.LIBUSB_SPEED_LOW
const SPEED_FULL = C.LIBUSB_SPEED_FULL
const SPEED_HIGH = C.LIBUSB_SPEED_HIGH
const SPEED_SUPER = C.LIBUSB_SPEED_SUPER

var SPEED_names = map[byte]string{
byte(SPEED_UNKNOWN): "UNKNOWN",
byte(SPEED_LOW): "LOW",
byte(SPEED_FULL): "FULL",
byte(SPEED_HIGH): "HIGH",
byte(SPEED_SUPER): "SUPER",
}

type ControlSetup C.struct_libusb_control_setup
type Transfer C.struct_libusb_transfer

I'm on debian squeeze. Thanks if you can help.

Regards

Vincenzo


Reply to this email directly or view it on GitHubhttps://github.com//issues/32
.

Han-Wen Nienhuys - [email protected] - http://www.xs4all.nl/~hanwen

from go-mtpfs.

vishalmahaveer avatar vishalmahaveer commented on August 12, 2024

I am trying to build on ubuntu 11.04 and I face the same issue...

I have libusb-1.0 installed on my PC

~$ pkg-config --cflags libusb-1.0
-I/usr/include/libusb-1.0
~$ pkg-config --libs libusb-1.0
-lusb-1.0

from go-mtpfs.

ivanff avatar ivanff commented on August 12, 2024

I am also have this problem with my old linuxmint 11 (ubuntu natty)

from go-mtpfs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.