Test GUI build error on windows #68
Labels
No labels
3rdparty
Android
API
Author does not respond
bsd
bug
build system/CI
ci-virtual-device
CMake
Contributions Welcome
Core
dependencies
device-specific
documentation
don't_merge
duplicate
enhancement
Example
Haiku
hidraw
hotplug
info required
invalid
libusb
macOS
Misc
Not an issue
question
Release
Test
Test GUI
Windows
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-libusb/hidapi#68
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi!
I want to build the library with Test GUI using Cygwin on windows. But after adding
--enable-testguiargument to./configureand runmakeit gives me manyundefined reference to ...errors. But without--enable-testguiargument the library is built successfully.the whole
makeoutput command is as follow:Am I wrong somewhere?
Do you have Fox toolkit installed locally?
See here: https://github.com/libusb/hidapi/blob/master/configure.ac#L187
Yes, I get the
hidapi-externals.zippackage from here and extract it just outside of hidapi. Now i have:The error you have is a link time error.
Either
libFOX-1.6.anot found or not accepted by linker.Can you shareNever mind.configureandmake -noutput?Tried locally on my PC: it appears, that pre-build FOX Toolkit from here: https://github.com/downloads/signal11/hidapi/hidapi-externals.zip was build by a compiler that is incompatible with latest GCC from Cygwin.
Build FOX from sources using same compiler, replace header/binary at hidapi-external, and you should be good (tried that locally, it worked).
Please don't ask how to build FOX using Cygwin - this is a matter of a separate discussion and a bit off-topic (yes I had issues with it and don't have elegant solution for all of them).
I tried to build FOX with current installed Cygwin but it has some errors too. Ok I don't ask.
Thank you in advance for your help.
Not exactly the same but related. I tried to build the test gui under MSys 2 and it failed as well.
The problem is that the fox library is hard coded. Probably it is better to change to use pkg-config.
Of course you can use the ./configure option to fix the issue, but it is probably better to use pkg-config.
Somehow pkg-config is actually correct. Need to check again.
This one is tough.
I have tried to build Fox with VS2019 (with a few fixes) and it was okay. But then Building the TestGUI still failed.
Severity Code Description Project File Line Suppression State
Error LNK2001 unresolved external symbol "public: static class FX::FXMetaClass const FX::FXListItem::metaClass" (?metaClass@FXListItem@FX@@2VFXMetaClass@2@B) testgui C:\work\hid\hidapi\testgui\test.obj 1
Full building error message with Fox 1.7.77 release, using FOXDLL-1.7.lib (dynamic link)
Fox 1.7.77 Win32 build with VS2019 with modified FXAtomic.cpp file (included in the zip file)
hidapi-externals.zip
Ref on the fix of FOX source code FXAtomic.cpp file: https://github.com/catid/libcat/issues/4
Finally got successful with MSYS2 MinGW64 distro. I need to copy the fox development files to hidapi-externals directory in order for the build to be successful.
Fox development files packaged from MSYS2 MinGW64 (64bit)
hidapi-externals.zip
64bit MSYS2 MinGW64 Windows binary of hidapi, including hidtest.exe and hid hidapi-testgui.exe, for commit
4d63a5085a, as well as the above Fox development files.hidapi_mingw64_bin_snapshot.zip
Take note the above hidapi-testgui.exe is statically linked to hidapi and fox library.
Tested with Microchip HID Simple Demo and it works fine.
I will still keep this issue open since I can not get VS2019 working. But probably someone else will figure out the issue.
Still for most of the users, I will recommend this command line tool.
https://github.com/todbot/hidapitester
For those who need a GUI, you can try the following. Windows binary is included. But it does not seem to work very well based on my testing.
https://github.com/todbot/hidpytoy
Fox development files packaged from MSYS2 MinGW32 (32bit)
hidapi-externals_mingw32.zip
32bit MSYS2 MinGW32 Windows binary of hidapi, including hidtest.exe and hid hidapi-testgui.exe, for commit
4d63a5085a, as well as the above Fox development files.hidapi_mingw32_bin_snapshot.zip
64bit MSYS2 MinGW64 Windows binary of hidapi, including hidtest.exe and hid hidapi-testgui.exe, for commit
4d63a5085a, as well as the above Fox development files. This is with dynamic build.hidapi_mingw64_bin_snapshot.zip
The snapshot binaries are also available from here (hidtest.exe and hidapi-testgui.exe are dynamically linked to the hidapi dll file).
https://github.com/mcuee/hidapi/releases/tag/snapshot_26Aug2021
Screenshot:

hidpytoy: input report/output report

hidpytoy feature report (out and in)

There is a difference between the test gui and the hidpytoy, I tend to think the HIDAPI test gui is correct.
Ref: https://github.com/libusb/hidapi/issues/285
README.md has been updated. So I think we can close this issue.
https://github.com/libusb/hidapi/blob/master/README.md