Skip to content
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

Use cc instead gcc and remove unused variables #67

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ikspress
Copy link

@ikspress ikspress commented Apr 16, 2024

Now it can be built sucessfully on CLANG64 with remove -Werror manually.

@mcuee
Copy link
Owner

mcuee commented Apr 16, 2024

Have you tested this with cross GCC compiler under Linux?

@ikspress
Copy link
Author

Have you tested this with cross GCC compiler under Linux?

Oops, I forgot. I will.

@ikspress
Copy link
Author

ikspress commented Apr 16, 2024

Command: make host_prefix=x86_64-w64-mingw32

Output:

x86_64-w64-mingw32-cc -O2 -Wall -DWINVER=0x500  -Werror -Wno-unknown-pragmas -Wno-multichar -DLOG_APPNAME=\"libusb0-dll\" -DTARGETTYPE=DYNLINK -c ./src/usb.c -o usb.2.o  -I./src -I./src/driver -I. 
x86_64-w64-mingw32-cc -O2 -Wall -DWINVER=0x500  -Werror -Wno-unknown-pragmas -Wno-multichar -DLOG_APPNAME=\"libusb0-dll\" -DTARGETTYPE=DYNLINK -c ./src/error.c -o error.2.o  -I./src -I./src/driver -I. 
x86_64-w64-mingw32-cc -O2 -Wall -DWINVER=0x500  -Werror -Wno-unknown-pragmas -Wno-multichar -DLOG_APPNAME=\"libusb0-dll\" -DTARGETTYPE=DYNLINK -c ./src/descriptors.c -o descriptors.2.o  -I./src -I./src/driver -I. 
x86_64-w64-mingw32-cc -O2 -Wall -DWINVER=0x500  -Werror -Wno-unknown-pragmas -Wno-multichar -DLOG_APPNAME=\"libusb0-dll\" -DTARGETTYPE=DYNLINK -c ./src/windows.c -o windows.2.o  -I./src -I./src/driver -I. 
x86_64-w64-mingw32-cc -O2 -Wall -DWINVER=0x500  -Werror -Wno-unknown-pragmas -Wno-multichar -DLOG_APPNAME=\"libusb0-dll\" -DTARGETTYPE=DYNLINK -c ./src/install.c -o install.2.o  -I./src -I./src/driver -I. 
x86_64-w64-mingw32-cc -O2 -Wall -DWINVER=0x500  -Werror -Wno-unknown-pragmas -Wno-multichar -DLOG_APPNAME=\"libusb0-dll\" -DTARGETTYPE=DYNLINK -c ./src/registry.c -o registry.2.o  -I./src -I./src/driver -I. 
x86_64-w64-mingw32-windres  -I./src ./src/resource.rc -o resource.2.o
x86_64-w64-mingw32-cc -O2 -Wall -DWINVER=0x500  -Werror -Wno-unknown-pragmas -Wno-multichar -DLOG_APPNAME=\"libusb0-dll\" -DTARGETTYPE=DYNLINK -o libusb0.dll -I./src  usb.2.o error.2.o descriptors.2.o windows.2.o install.2.o registry.2.o resource.2.o libusb0.def -s -mdll -Wl,--kill-at -Wl,--out-implib,libusb.a -Wl,--enable-stdcall-fixup -L. -lcfgmgr32 -lsetupapi -lgdi32
x86_64-w64-mingw32-cc -O2 -Wall -DWINVER=0x500  -Werror -Wno-unknown-pragmas -Wno-multichar -DLOG_APPNAME=\"install-filter\" -DTARGETTYPE=PROGRAMconsole -DLOG_STYLE_SHORT -c ./src/install_filter.c -o install_filter.1.o  -I./src -I./src/driver -I.
x86_64-w64-mingw32-cc -O2 -Wall -DWINVER=0x500  -Werror -Wno-unknown-pragmas -Wno-multichar -DLOG_APPNAME=\"install-filter\" -DTARGETTYPE=PROGRAMconsole -DLOG_STYLE_SHORT -c ./src/error.c -o error.1.o  -I./src -I./src/driver -I.
x86_64-w64-mingw32-cc -O2 -Wall -DWINVER=0x500  -Werror -Wno-unknown-pragmas -Wno-multichar -DLOG_APPNAME=\"install-filter\" -DTARGETTYPE=PROGRAMconsole -DLOG_STYLE_SHORT -c ./src/install.c -o install.1.o  -I./src -I./src/driver -I.
x86_64-w64-mingw32-cc -O2 -Wall -DWINVER=0x500  -Werror -Wno-unknown-pragmas -Wno-multichar -DLOG_APPNAME=\"install-filter\" -DTARGETTYPE=PROGRAMconsole -DLOG_STYLE_SHORT -c ./src/registry.c -o registry.1.o  -I./src -I./src/driver -I.
x86_64-w64-mingw32-windres  -I./src ./src/install_filter_rc.rc -o install_filter_rc.1.o
x86_64-w64-mingw32-cc -O2 -Wall -DWINVER=0x500  -Werror -Wno-unknown-pragmas -Wno-multichar -DLOG_APPNAME=\"install-filter\" -DTARGETTYPE=PROGRAMconsole -DLOG_STYLE_SHORT -o install-filter.exe -I./src  install_filter.1.o error.1.o install.1.o registry.1.o install_filter_rc.1.o -s -L. -lgdi32 -luser32 -lcfgmgr32 -lsetupapi
x86_64-w64-mingw32-cc -c ./tests/testlibusb.c -o testlibusb.3.o -O2 -Wall -DWINVER=0x500  -Werror -Wno-unknown-pragmas -Wno-multichar -DLOG_APPNAME=\"testlibusb\" -DTARGETTYPE=PROGRAMconsole  -I./src -I./src/driver -I. 
x86_64-w64-mingw32-cc -O2 -Wall -DWINVER=0x500  -Werror -Wno-unknown-pragmas -Wno-multichar -DLOG_APPNAME=\"testlibusb\" -DTARGETTYPE=PROGRAMconsole -o testlibusb.exe -I./src  testlibusb.3.o -s -L. -lusb -lgdi32 -luser32 -lcfgmgr32 -lsetupapi -lcomctl32
x86_64-w64-mingw32-cc -c ./tests/testlibusb_win.c -o testlibusb_win.4.o -O2 -Wall -DWINVER=0x500  -Werror -Wno-unknown-pragmas -Wno-multichar -DLOG_APPNAME=\"testlibusb-win\" -DTARGETTYPE=PROGRAMwindows  -I./src -I./src/driver -I. 
x86_64-w64-mingw32-windres  -I./src ./tests/testlibusb_win_rc.rc -o testlibusb_win_rc.4.o
x86_64-w64-mingw32-cc -O2 -Wall -DWINVER=0x500  -Werror -Wno-unknown-pragmas -Wno-multichar -DLOG_APPNAME=\"testlibusb-win\" -DTARGETTYPE=PROGRAMwindows -o testlibusb-win.exe -I./src  testlibusb_win.4.o testlibusb_win_rc.4.o -s -L. -lusb -lkernel32 -lgdi32 -luser32 -lnewdev -lsetupapi -lcomctl32 -lole32 -mwindows

I built it successfully on Arch Linux with mingw-w64-toolchain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants