메뉴 건너뛰기

OBG

Programming

MoA
조회 수 626 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

VC++ 6.0으로 작성된 파일을 VC++ 2005로 프로젝트를 생성(변환)하여 컴파일하여 다음과 같은 에러가 발생하였다.

(물론 INCLUDE, LIB 폴더 환경은 맞는다는 가정하에....)

 

1>------ 빌드 시작: 프로젝트: PSDMain, 구성: Debug Win32 ------
1>컴파일하고 있습니다...
1>ChildView.cpp
1>d:프로젝트srcpsdclientpsdmainchildview.cpp(66) : error C2440: 'static_cast' : 'void (__thiscall CChildView::* )(void)'에서 'LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)'(으)로 변환할 수 없습니다.
1>        대상 형식과 일치하는 범위에 이름이 같은 함수가 없습니다.
1>PSD10010Dlg.cpp
1>d:프로젝트srcpsdclientpsdmainpsd10010dlg.cpp(65) : error C2440: 'static_cast' : 'void (__thiscall CPSD10010Dlg::* )(void)'에서 'LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)'(으)로 변환할 수 없습니다.
1>        대상 형식과 일치하는 범위에 이름이 같은 함수가 없습니다.
1>PSD90010Dlg.cpp
1>d:프로젝트srcpsdclientpsdmainpsd90010dlg.cpp(43) : error C2440: 'static_cast' : 'void (__thiscall CPSD90010Dlg::* )(void)'에서 'LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)'(으)로 변환할 수 없습니다.
1>        대상 형식과 일치하는 범위에 이름이 같은 함수가 없습니다.
1>코드를 생성하고 있습니다...
1>찾아보기 정보 파일 만들고 있습니다...
1>Microsoft Browse Information Maintenance Utility Version 8.00.50727
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>빌드 로그가 "file://d:프로젝트SrcPSDClientPSDMainDebugBuildLog.htm"에 저장되었습니다.
1>PSDMain - 오류: 3개, 경고: 0개
========== 빌드: 성공 0, 실패 1, 최신 0, 생략 0 ==========

 

--------------------------------------------------------------------------------------------------------------

- 위의 굵은글자의 경고에 대한 처리방법

--------------------------------------------------------------------------------------------------------------

 

afx_msg void OnPsdScrInfo();

===> 다음과 같이 변경한다.

afx_msg LRESULT OnPsdScrInfo(WPARAM wParam,LPARAM lParam);

 

 

void CChildView::OnPsdScrInfo()
{

   :

}

===> 다음과 같이 변경한다.

LRESULT CChildView::OnPsdScrInfo(WPARAM wParam,LPARAM lParam)
{
 :
 return(0);
}

위와 같이 변경하니 경고 없어졌네요.


[출처] VC++6.0 에서 VC++ 2005로 변환할 경우 형변환 경고 대응방법 (VisualTools) |작성자 softpd

?

  1. Programming 게시판 관련

  2. unsigned char <-> 유니코드(unicode) 및, string 변환 매크로 - USES_CONVERSION

  3. UpdateData(TRUE) or UpdateData(FALSE) 구분

  4. UpdateDialogControls

  5. UpdateWindow 함수에 대하여..

  6. Using Machine Learning to Predict Customers’ Next Purchase Day

  7. VC++6.0 에서 VC++ 2005로 변환할 경우 형변환 경고 대응방법

  8. VC의 소스 파일, sln파일 관리

  9. Video Preview and Frames Capture

  10. Visual C++ 시리얼 통신(RS-232) 강좌 (1)

  11. Visual C++ 시리얼 통신(RS-232) 강좌 (2)

  12. Visual Studio Debug Tips

  13. WaitForSingleObject와의 삽질..

  14. What does set -e mean in a bash script?

  15. What does the last “-” (hyphen) mean in options of `bash`?

  16. What to use instead of “addPreferencesFromResource” in a PreferenceActivity?

  17. What's the difference between comma separated joins and join on syntax in MySQL?

  18. Which Font is the default for MFC Dialog Controls

  19. Win32 Socket Class

  20. Windows 10 앱 개발(UWP)

  21. WTL 정리

Board Pagination Prev 1 ... 5 6 7 8 9 10 11 12 13 14 ... 15 Next
/ 15
위로