commit 2025-08-25 00:53 edit a bit ZCppMainTest/ZtCLoadXml_000.cpp
This commit is contained in:
@ -4383,6 +4383,45 @@ namespace ZNsCPP */
|
||||
|
||||
-- 2013-06-23 19:34:00
|
||||
|
||||
■ mingw 의 g++ 에서 아래 코드가 오류다.
|
||||
|
||||
|
||||
#incldue<iostream>
|
||||
|
||||
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)
|
||||
| ~~~~~~~~~~~~^~~~~~~~~~~~~~
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
|
||||
|
@ -13,6 +13,43 @@ namespace ZNsMain
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
/* 아래 Main() 함수 선언을 아래로 하면
|
||||
|
||||
static int Main(int AI_ArgCnt=0, const char* APP_ArgVal[]=0)
|
||||
|
||||
mingw g++ 에서 희한하게 에러다.
|
||||
|
||||
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)
|
||||
| ~~~~~~~~~~~~^~~~~~~~~~~~~~
|
||||
|
||||
|
||||
아래 코드는 또 컴파일 에러가 없다.
|
||||
|
||||
#include<iostream>
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
*/
|
||||
static int Main(int AI_ArgCnt=0, char* APP_ArgVal[]=0)
|
||||
{
|
||||
typedef ZNsMain::ZtCStringBase<char> ZCStringData ;
|
||||
|
Reference in New Issue
Block a user