-
Notifications
You must be signed in to change notification settings - Fork 32
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
Unable to compile #5
Comments
for compile main.c , you i need a hidapi.h library
example: for me this software not working in alternative can use this: libsdl-org/SDL#4923 , for me working |
Editing the full path of hidapi.h to main.c worked for me as well. I ran |
I'm on Manjaro, and
I figured out, I could use
make note of that install path, now, edit # Specify the location of HIDAPI's header files
include_directories(/nix/store/8lci9gx0hsnqj9d9acck88ykz82rd8g6-hidapi-0.14.0/include)
# Specify the location of HIDAPI's library
link_directories(/nix/store/8lci9gx0hsnqj9d9acck88ykz82rd8g6-hidapi-0.14.0/lib)
# Add HIDAPI as a library
add_library(hidapi STATIC IMPORTED)
set_target_properties(hidapi PROPERTIES IMPORTED_LOCATION /nix/store/8lci9gx0hsnqj9d9acck88ykz82rd8g6-hidapi-0.14.0/lib/libhidapi-libusb.so) Also, replace target_link_libraries (${PROJECT_NAME} hidapi ${PLATFORM_LIBS}) It should now compile successfully. |
I updated the cmake to be more modern and do a better job finding hidapi. You can use -DCMAKE_PREFIX_PATH to specify a specific location if hidapi is installed in a non-standard place. |
Hi, already tried a lot of tricks to overcome my issue but nothing: the cmake . continue to tell me "WARNING: Target "sixaxispairing" requests linking to directory "/usr/local/lib". Targets may link only to libraries. CMake is dropping the item."
It does complete the configuration but executing make the linker fails its job: "/usr/bin/ld: CMakeFiles/sixaxispairing.dir/main.c.o: in function `main'"
My environment is latest linux mint (ubuntu derivative). The library hidapi from https://github.com/signal11/hidapi was compiled and installed successfully.
What I'm doing wrong?
PS: please do a release for each platform because on internet I found some installer for windows that are infected by trojans
PPS: correct cmake .. to cmake .
The text was updated successfully, but these errors were encountered: