pololu / libusbp

The Pololu USB Library (also known as libusbp) is a cross-platform C library for accessing USB devices.
Other
106 stars 34 forks source link

cmake not working on win10 under msys2 #5

Closed jakelewis3d closed 5 years ago

jakelewis3d commented 5 years ago

The command MSYS2_ARG_CONV_EXCL=- cmake .. -G"MSYS Makefiles" -DCMAKE_INSTALL_PREFIX=$MINGW_PREFIX issues an error saying MSYS generator is not available.

I built it using MSYS2_ARG_CONV_EXCL=- cmake .. -G"Unix Makefiles" -DCMAKE_INSTALL_PREFIX=$MINGW_PREFIX but there was no definition of WINDOWS, APPLE nor LINUX for CMakeLists.txt. As a workaround I edited it to include only the windows relative files.

make install DESTDIR=/ failed to write the output libraries on windows, I think it needs the destdir to be absolute rather than relative.

Jake

Jake

DavidEGrayson commented 5 years ago

You might be using the wrong MSYS2 environment, or you forgot to install the needed packages. Please double-check the build directions, and if you continue to have trouble then please post the output of these commands:

echo $MSYSTEM
which cmake
which gcc
jakelewis3d commented 5 years ago

Thank you for your prompt reply.

jlewis@jakesy700 MINGW64 ~/libusbp/build

echo $MSYSTEM

MINGW64

jlewis@jakesy700 MINGW64 ~/libusbp/build

which cmake

/usr/bin/cmake

jlewis@jakesy700 MINGW64 ~/libusbp/build

which gcc

/mingw64/bin/gcc

jlewis@jakesy700 MINGW64 ~/libusbp/build

cmake -version

cmake version 3.15.4

CMake suite maintained and supported by Kitware (kitware.com/cmake).

Jake

DavidEGrayson commented 5 years ago

Please try installing the proper version of CMake:

pacman -S $MINGW_PACKAGE_PREFIX-cmake
jakelewis3d commented 5 years ago

I've tried that but am still having issues. I'd decided to just go with the ticcmd option instead to avoid these headaches, but thank you for your prompt assistance. jake