From 4015ba27582373ae7884969a18b2d01335a8a029 Mon Sep 17 00:00:00 2001 From: sauron Date: Mon, 25 Aug 2025 01:41:28 +0900 Subject: [PATCH] commit 2025-08-25 01:41 add ZCppMainTest/g++_test_000.cpp --- ZCppMain/ZMainHead.H | 48 +++++++++++++++++++++++++++++++----- ZCppMainTest/g++_test_000.cpp | 57 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 99 insertions(+), 6 deletions(-) create mode 100644 ZCppMainTest/g++_test_000.cpp diff --git a/ZCppMain/ZMainHead.H b/ZCppMain/ZMainHead.H index 176ad7f..6947677 100644 --- a/ZCppMain/ZMainHead.H +++ b/ZCppMain/ZMainHead.H @@ -4383,7 +4383,7 @@ namespace ZNsCPP */ -- 2013-06-23 19:34:00 -■ mingw 의 g++ 에서 아래가 컴파일이 안 된다. +■ g++ 에서 아래가 컴파일이 안 된다. #include @@ -4407,18 +4407,18 @@ namespace ZNsCPP */ □ mingw 컴파일 - g++.exe -o mingw_g++_test_000.exe mingw_g++_test_000.cpp -I../ + g++.exe -o g++_test_000.exe g++_test_000.cpp -I../ Administrator@q381-2673 UCRT64 /e/my_CPP/ZCpp/ZCppMainTest - # g++.exe -o mingw_g++_test_000.exe mingw_g++_test_000.cpp -I../ - mingw_g++_test_000.cpp: In function 'int main(int, char**)': - mingw_g++_test_000.cpp:18:28: error: invalid conversion from 'char**' to 'const cha + # g++.exe -o g++_test_000.exe g++_test_000.cpp -I../ + g++_test_000.cpp: In function 'int main(int, char**)': + g++_test_000.cpp:18:28: error: invalid conversion from 'char**' to 'const cha r**' [-fpermissive] 18 | return Main(AI_ArgCnt, APP_ArgVal); | ^~~~~~~~~~ | | | char** - mingw_g++_test_000.cpp:9:39: note: initializing argument 2 of 'int Main(int, cons + g++_test_000.cpp:9:39: note: initializing argument 2 of 'int Main(int, cons t char**)' 9 | int Main(int AI_ArgCnt=0, const char* APP_ArgVal[]=0) | ~~~~~~~~~~~~^~~~~~~~~~~~~~ @@ -4430,6 +4430,42 @@ namespace ZNsCPP */ This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + □ 해결 방법-1 + + #include + + using namespace std; + + int Main(int AI_ArgCnt=0, const char* const APP_ArgVal[]=0) + { + cout<<"Call Main()"< + + using namespace std; + + int Main(int AI_ArgCnt=0, char* const APP_ArgVal[]=0) + { + cout<<"Call Main()"< + + +using namespace std; + + +int Main(int AI_ArgCnt=0, const char* APP_ArgVal[]=0) +{ + cout<<"Call Main()"<