Visual Studio에서 Mingw GCC로 일부 코드를 이식하고 있습니다. 이 코드는 Visual Studio에서 잘 실행되지만 Mingw에서 빌드하려고하면 다음과 같은 문제가 발생합니다. 코드는 아래와 같습니다.
HeaderFile
template <MThread Thread>
class AFWork : public EffectFramework<Thread>
{
public:
AFWork(HINSTANCE hinst, HWND hWindow,
const std::wstring& stSharedDataPath,
const std::wstring& stGameDataPath,
const std::wstring& stExtendedGameDataPath,
int nScrWidth, int nScrHeight);
virtual ~AFWork(void);
...
...
};
위에서 참조 된 기본 클래스의 다른 헤더 파일은 다음과 같습니다.
HeaderFile
template <MThread Thread>
class EffectFramework : public ktWin32Framework
{
public:
typedef boost::function<void (int window_no, HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)> WindowProcedure;
EffectFramework<Thread>( std::wstring& name,
std::wstring& dataDirPrefix,
VSYNC vsync,
HINSTANCE hinst,
HINSTANCE hprevinst,
LPSTR args,
int mode,
IApplicationManager* appl_manager = NULL);
....
....
};
파생 클래스 생성자의 구현
template <MThread Thread>
AFWork<Thread>::AFWork(HINSTANCE hinst,
HWND hWindow,
const std::wstring& stSharedDataPath,
const std::wstring& stGameDataPath,
const std::wstring& stExtendedDataPath,
int nScrWidth,
int nScrHeight)
: EffectFramework<Thread>::EffectFramework(wstring(L"ArtViewer"), wstring(L""), VSYNC::VSYNC_1, hinst, NULL, NULL, 0, NULL) <---ERROR
{
}
내가 얻는 오류는 이것이다
error: no matching function for call to 'T_Wrapper::EffectFramework<(T_Wrapper::T_Thread)0u>::EffectFramework(std::wstring, std::wstring, T_Wrapper::VSYNC, HINSTANCE__*&, int, int, int, int)'|
이 오류가 발생하는 이유와 해결 방법에 대한 제안 사항이 있습니까?
의 후보 생성자 EffectFramework
가 std::wstring&
첫 번째 및 두 번째 매개 변수로 있지만 임시 변수를 전달하는 것 같습니다. 예를 들어 전역 변수를 전달하면 작동합니다.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다