创建项目

This commit is contained in:
GreatFood404 2025-05-09 11:11:34 +08:00
commit d8cccfca22
2 changed files with 29 additions and 0 deletions

9
CMakeLists.txt Normal file
View File

@ -0,0 +1,9 @@
cmake_minimum_required(VERSION 3.30)
project(sdktools)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++")
add_executable(sdktools main.cpp)

20
main.cpp Normal file
View File

@ -0,0 +1,20 @@
#include <iostream>
using namespace std;
int main() {
while (true) {
string command;
cout << ">>>";
getline(cin, command);
if (command == "list"){
cout << "list" <<endl;
}
else if (command == "exit") {
return 0;
}
else {
printf("未知的指令\"%s\",请使用\"help\"获取更多帮助\n",command.c_str());
}
}
}