从 powershell 编译名称为 1.0 的 gcc 库
Compiling a gcc library with 1.0 in name from powershell
我正在尝试使用 libusb-1.0 库编译一个项目。当我使用以下命令从 cmd 编译时
gcc -g main.c -o test.exe -lusb-1.0
我的程序编译得很好。但是,如果我尝试在 VSC 中使用 Powershell window,我会收到此错误
gcc.exe: error: .0: No such file or directory
我 运行 来自两个终端的相同代码。
虽然我仍然可以编译和 运行 我的代码,但如果我可以在 VSC 中完成它会很方便。
我该如何解决这个错误?
尝试在 -lusb-1.0
参数周围加上(双)引号。
我正在尝试使用 libusb-1.0 库编译一个项目。当我使用以下命令从 cmd 编译时
gcc -g main.c -o test.exe -lusb-1.0
我的程序编译得很好。但是,如果我尝试在 VSC 中使用 Powershell window,我会收到此错误
gcc.exe: error: .0: No such file or directory
我 运行 来自两个终端的相同代码。 虽然我仍然可以编译和 运行 我的代码,但如果我可以在 VSC 中完成它会很方便。 我该如何解决这个错误?
尝试在 -lusb-1.0
参数周围加上(双)引号。