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

Building under linux #4

Open
0xee opened this issue Aug 25, 2013 · 0 comments
Open

Building under linux #4

0xee opened this issue Aug 25, 2013 · 0 comments

Comments

@0xee
Copy link

0xee commented Aug 25, 2013

There are a few issues which prevent a full build on linux with gcc

  • libusb.h include path assumes that the file lies in /libusb/, which might not be true for all systems (on fedora 19 the subdirectory is libusb-1.0). it would be better to just include libusb.h and set the directory as include path via pkg-config.
  • std::exception has no constructor which takes a c-string as argument (this seems to be microsoft-specific)
  • include file names are not compatible with case-sensitive systems (eg. Interface.h is included as interface.h)
rexut added a commit to rexut/libusbpp that referenced this issue Nov 28, 2016
On case sesitive systems there were a lot of compilation
errors "No such file or directory" due to wrong upper case
letter in file names.

As part of fix them some changes on the code style were made:

  - correct CamelCase in all file names
  - more or missing new lines for seperaition
  - remove trailing white space on line end
  - rename header from .h -> .hpp
  - resort order of inclusion (system header first)
  - global search for public interface header
  - remove #pragma once from main files
  - remove #pragma once from header files and add ifndef-
    define-endif rules instead

Related-to-issue: zarthcode#4
Signed-off-by: Stephan Linz <[email protected]>
rexut added a commit to rexut/libusbpp that referenced this issue Nov 28, 2016
libusb.h include path assumes that the file lies in /libusb/,
which might not be true for all systems (on Linux systems
the subdirectory is libusb-1.0). It would be better to just
include only libusb.h and set the sub-directory as include
path via pkg-config or something else.

Error was:

.../src/configuration_impl.hpp:7:27: fatal error:
   libusb/libusb.h: No such file or directory

Related-to-issue: zarthcode#4
Signed-off-by: Stephan Linz <[email protected]>
rexut added a commit to rexut/libusbpp that referenced this issue Nov 28, 2016
std::exception has no constructor which takes a c-string as argument,
this seems to be Microsoft specific.

See: http://stackoverflow.com/a/1570192

Error was:

error: no matching function for call to
       'std::exception::exception(const char [X])'

Related-to-issue: zarthcode#2
Related-to-issue: zarthcode#4
Signed-off-by: Stephan Linz <[email protected]>
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

1 participant