pok3r-custom / pok3rtool

Command line tool and library for keyboards using qmk-pok3r
BSD 3-Clause "New" or "Revised" License
41 stars 7 forks source link

Issues compiling #4

Closed jknight-liatrio closed 5 years ago

jknight-liatrio commented 5 years ago

Hi, I'm having issues compiling the project on OS X. I'm probably just doing it wrong. I've successfully pulled down the submodules.

$ cmake CMakeLists.txt
$ make
<... make output ...>
4 warnings generated.
[100%] Linking CXX executable pok3rtool
Undefined symbols for architecture x86_64:
  "_rawhid_openall", referenced from:
      HIDDevice::openAll(unsigned short, unsigned short, unsigned short, unsigned short) in librawhid.a(hiddevice.cpp.o)
     (maybe you meant: _rawhid_openall_filter)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [pok3rtool] Error 1
make[1]: *** [CMakeFiles/pok3rtool.dir/all] Error 2
make: *** [all] Error 2

What am I doing wrong? It would be nice if the README has instructions for building the project.

Thanks

ChaoticEnigma commented 5 years ago

I believe the issue is cmake CMakeLists.txt, which should be cmake .. You want to pass the source directory to cmake, instead i think it is executing the CMakeLists directly?

In any case, I added the commands needed to build pok3rtool to the README. I recommend you build in a separate directory, which those commands will do for you.

TaiSHiNet commented 5 years ago
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin 

Installed cmake through brew and followed the steps as the README instructs

Running into the same issue. Could this be related to https://github.com/pok3r-custom/pok3r_re_firmware/issues/14 ?

ChaoticEnigma commented 5 years ago

@TaiSHiNet Could you open a new issue with the exact commands and output? Thanks.