我嘗試在Windows上使用鏈接符號的時間戳用gcc:定義符號GCC在Windows
gcc.exe -DTIMESTAMP=$(shell "C:/mingw/msys/1.0/bin/date.exe +%s") -E helloworld.c -o test.E
但我得到的輸出:
gcc.exe: error: C:/mingw/msys/1.0/bin/date.exe +s): No such file or directory
「C:/ MinGW的/ msys/1.0/bin/date.exe + s「的命令行工作...
我在做什麼錯?
我試過「gcc.exe -DTIMESTAMP = $(shell C:/mingw/msys/1.0/bin/date.exe + %% s)-E helloworld.c -o test.E」但沒有改變任何東西...給我:gcc.exe:錯誤:+%s):沒有這樣的文件或目錄 –
您是否試圖從Windows控制檯運行此命令(「DOS提示符」/「命令提示符」)? –
是的。我寫了一個bat文件來測試它。 –