From 6c39a38af604f181d5e69fea1b447757e51543a4 Mon Sep 17 00:00:00 2001 From: TaurusXin Date: Sat, 6 Jan 2024 00:37:55 +0800 Subject: [PATCH] fix: using filesystem must over c++17 --- Makefile | 8 ++++---- main.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 569c0cf..232bec6 100644 --- a/Makefile +++ b/Makefile @@ -2,21 +2,21 @@ default: @echo "Please choose a platform: linux, macos, win32" linux: - g++ main.cpp cJSON.cpp aes.cpp ncmcrypt.cpp -o ncmdump -ltag + g++ main.cpp cJSON.cpp aes.cpp ncmcrypt.cpp -o ncmdump -ltag -std=c++17 strip ncmdump macos-intel: - clang++ main.cpp cJSON.cpp aes.cpp ncmcrypt.cpp -o ncmdump -ltag + clang++ main.cpp cJSON.cpp aes.cpp ncmcrypt.cpp -o ncmdump -ltag -std=c++17 strip ncmdump macos-arm64:export CPATH=/opt/homebrew/include macos-arm64:export LIBRARY_PATH=/opt/homebrew/lib macos-arm64: - clang++ main.cpp cJSON.cpp aes.cpp ncmcrypt.cpp -o ncmdump -ltag + clang++ main.cpp cJSON.cpp aes.cpp ncmcrypt.cpp -o ncmdump -ltag -std=c++17 strip ncmdump win32: - g++ main.cpp cJSON.cpp aes.cpp ncmcrypt.cpp -o ncmdump -ltag -Ltaglib/lib -Itaglib/include -static -O -municode + g++ main.cpp cJSON.cpp aes.cpp ncmcrypt.cpp -o ncmdump -ltag -Ltaglib/lib -Itaglib/include -static -O -municode -std=c++17 strip ncmdump.exe clean: diff --git a/main.cpp b/main.cpp index 6d73704..13650df 100644 --- a/main.cpp +++ b/main.cpp @@ -99,7 +99,7 @@ int main(int argc, char **argv) WideCharToMultiByte(CP_UTF8, 0, argv[i], -1, multiByteStr, multiByteStrSize, NULL, NULL); fs::path path(multiByteStr); #else - fs::path path(arg); + fs::path path(argv[i]); #endif files.push_back(path); }