commit 2025-08-25 00:58 edit a bit ZCppMain/ZMainHead.H

This commit is contained in:
2025-08-25 00:58:34 +09:00
parent 48121102bb
commit f3ce568dc5

View File

@ -4383,44 +4383,50 @@ namespace ZNsCPP */
-- 2013-06-23 19:34:00
■ mingw 의 g++ 에서 아래 코드가 오류다.
■ mingw 의 g++ 에서 아래 파일 컴파일에서
ZCppMainTest/ZtCLoadXml_000.cpp
오류가 발생한다.
Administrator@q381-2673 UCRT64 /e/my_CPP/ZCpp/ZCppMainTest
# g++ --version
g++.exe (Rev2, Built by MSYS2 project) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#incldue<iostream>
Administrator@q381-2673 UCRT64 /e/my_CPP/ZCpp/ZCppMainTest
# g++.exe -o ZtCLoadXml_000_mw.exe ZtCLoadXml_000.cpp -I../ -lWs2_32
ZtCLoadXml_000.cpp: In function 'int main(int, char**)':
ZtCLoadXml_000.cpp:171:42: error: invalid conversion from 'char**' to 'const char**' [-fpermissive]
171 | ZtExamLoadXml<>::Main(AI_ArgCnt, APP_ArgVal);
| ^~~~~~~~~~
| |
| char**
ZtCLoadXml_000.cpp:16:58: note: initializing argument 2 of 'static int ZNsMain::ZNsExam::ZtExamLoadXml<TDymmy>::Main(int, const char**) [with TDymmy = void*]'
16 | static int Main(int AI_ArgCnt=0, const char* APP_ArgVal[]=0)
| ~~~~~~~~~~~~^~~~~~~~~~~~~~
using namespace std;
희한한게, 아래로 컴파일하면 아무 문제 없다.
int Main(int AI_RrgCnt, const char* APP_ArgVal[]=0)
{
cout<<"Call Main()"<<endl; return 0;
}
#incldue<iostream>
int main(int AI_RrgCnt, char* APP_ArgVal[]=0)
{
return Main(AI_RrgCnt, APP_ArgVal);
}
using namespace std;
int Main(int AI_RrgCnt, const char* APP_ArgVal[]=0)
{
cout<<"Call Main()"<<endl; return 0;
}
int main(int AI_RrgCnt, char* APP_ArgVal[]=0)
{
return Main(AI_RrgCnt, APP_ArgVal);
}
Administrator@q381-2673 UCRT64 /e/my_CPP/ZCpp/ZCppMainTest
# g++ --version
g++.exe (Rev2, Built by MSYS2 project) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Administrator@q381-2673 UCRT64 /e/my_CPP/ZCpp/ZCppMainTest
# g++.exe -o ZtCLoadXml_000_mw.exe ZtCLoadXml_000.cpp -I../ -lWs2_32
ZtCLoadXml_000.cpp: In function 'int main(int, char**)':
ZtCLoadXml_000.cpp:171:42: error: invalid conversion from 'char**' to 'const char**' [-fpermissive]
171 | ZtExamLoadXml<>::Main(AI_ArgCnt, APP_ArgVal);
| ^~~~~~~~~~
| |
| char**
ZtCLoadXml_000.cpp:16:58: note: initializing argument 2 of 'static int ZNsMain::ZNsExam::ZtExamLoadXml<TDymmy>::Main(int, const char**) [with TDymmy = void*]'
16 | static int Main(int AI_ArgCnt=0, const char* APP_ArgVal[]=0)
| ~~~~~~~~~~~~^~~~~~~~~~~~~~
-- 2025-08-25 00:56
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/