On Sep 20, 2007, at 3:49 PM, ankita prasad wrote: > Do I need to build libhid on a machine for it to work on that > machine. Will > it not work if I just copy the libhid.so, libusb.so and their > corresponding > .a files and the executable on to a machine and run the executable > from > there?
Run "ldd test_libhid" (replacing test_libhid with the name of your program) on the target machine to be sure that the correct versions of libusb.so and libhid.so are found by the dynamic linker. If the .so files are truly .so files (that is, you ran 'make install' to generate them, as opposed to grabbing libhid.so from the build directory), then you should not need the .a files (or any other files except the .so files listed by ldd, and the executable itself) to run the program on another machine. > After my earlier bug I built the exact thing on fedora 6 and it > works fine > but when I copied the executable and the .so on to another machine > which is > fedora 6, I again get the broken pipe error. As Peter mentioned, it seems like there is some difference between the two systems. I would expect a linker error rather than the broken pipe error, but I haven't tried this myself. There may also be kernel version issues - it is hard to tell. Generally, if a Linux distribution packages a library, you should use their package (e.g. libusb). Debian policy seems to be a little stricter in terms of keeping backwards binary compatibility between minor revisions of shared libraries, but if you compiled something against a library included in Debian 4.0, I would not expect it to run unmodified on 3.1. -- Charles Lepple _______________________________________________ libhid-discuss mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/libhid-discuss

