Closed numeru55 closed 1 year ago
sorry, solved. seems well compiled.
(on wsl)
numeru55@aaaa:~/libmcp2221/examples/gpio$ x86_64-w64-mingw32-gcc -g -c main.c ../../libmcp2221/hid.c ../../libmcp2221/libmcp2221.c
In file included from main.c:16:
../../libmcp2221/win/win.h:15: warning: "_WIN32_WINNT" redefined
15 | #define _WIN32_WINNT 0x0501
|
In file included from /usr/share/mingw-w64/include/corecrt.h:10,
from /usr/share/mingw-w64/include/crtdefs.h:10,
from /usr/share/mingw-w64/include/stdio.h:9,
from main.c:15:
/usr/share/mingw-w64/include/_mingw.h:234: note: this is the location of the previous definition
234 | #define _WIN32_WINNT 0x502
|
numeru55@aaaa:~/libmcp2221/examples/gpio$ x86_64-w64-mingw32-gcc -g hid.o libmcp2221.o main.o -lsetupapi -o main.exe
numeru55@aaaa:~/libmcp2221/examples/gpio$ ls
Makefile gpio gpio.exe hid.o libmcp2221.dll libmcp2221.o main.c main.exe main.o
numeru55@aaaa:~/libmcp2221/examples/gpio$ ./main.exe
Starting!
Looking for devices... found 0 devices
Opening device... No MCP2221s found
numeru55@aaaa:~/libmcp2221/examples/gpio$
sorry again and again
PS >mingw32-gcc.exe ..\..\libmcp2221\hid.c ..\..\libmcp2221\libmcp2221.c main.c -lsetupapi -o gpio.exe