Search code examples
gccmingw-w64libusblinkagelibusb-1.0

Linker Option with 1.0 in name Windows


I am trying to create a program using the libusb-1.0 library After I installed the library when I try to compile like so

gcc -g main.c -o test.exe -lusb-1.0 i get the following error gcc.exe: error: .0: No such file or directory

what do I have to type for the linkage option "-lusb-1.0" to be read properly

I am using mingw64 on Windows


Solution

  • This can be solved by adding single or double quotes around '-lusb-1.0'

    for example here is the code i used to compile

    gcc *.c -o test.exe '-lusb-1.0'