Prev: Best way convert Char** to std::string and back
Next: LINK : fatal error LNK1104: cannot open file "nafxcwd.lib"
From: ColinG on 18 Apr 2007 10:25 With reference to aao's posting about "....I do not remember exactly but I think the version of WTL that is compatible with VS6 is 6.x , 7.0 at best , I am reasonably sure 7.5 will not work..." I have compiled using WTL 7.0. Now the compilations errors are as outlined in my original posting: Compiling resources... Compiling... StdAfx.cpp Compiling Picture.h'... Compiling 'UTCTimeServerChecker.h'... Compiling 'TCPSocket.h'... Define WS_EX_LAYERED... Define LWA_ALPHA... Include atlbase.h... Include atlapp.h... Define _Module as external linkage... Include atlwin.h... Include atlmisc.h... Include atlctrls.h.... Include atlframe.h... Include atldlgs.h... Include atlprint.h... Include atlctrlx.h... c:\wtl70\include\atlprint.h(809) : error C2664: 'int __thiscall CDC::SelectClipRgn(class CRgn *)' : cannot convert parameter 1 from 'class WTL::CRgnT<1>' to 'class CRgn *' No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called c:\wtl70\include\atlprint.h(792) : while compiling class-template member function 'long __thiscall WTL::CPrintPreviewWindowImpl<class WTL::CPrintPreviewWindow,class ATL::CWindow,class ATL::CWinTraits<1442840576,0> >::OnPaint(unsigned int,uns igned int,long,int &)' c:\wtl70\include\atlprint.h(810) : error C2664: 'FillRect' : cannot convert parameter 2 from 'const int' to 'class CBrush *' Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast c:\wtl70\include\atlprint.h(792) : while compiling class-template member function 'long __thiscall WTL::CPrintPreviewWindowImpl<class WTL::CPrintPreviewWindow,class ATL::CWindow,class ATL::CWinTraits<1442840576,0> >::OnPaint(unsigned int,uns igned int,long,int &)' c:\wtl70\include\atlprint.h(812) : error C2664: 'FillRect' : cannot convert parameter 2 from 'struct HBRUSH__ *' to 'class CBrush *' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\wtl70\include\atlprint.h(792) : while compiling class-template member function 'long __thiscall WTL::CPrintPreviewWindowImpl<class WTL::CPrintPreviewWindow,class ATL::CWindow,class ATL::CWinTraits<1442840576,0> >::OnPaint(unsigned int,uns igned int,long,int &)' Error executing cl.exe. Thanks. Colin "aao" <aao(a)work.com> wrote in message news:%23bLxt$bgHHA.4924(a)TK2MSFTNGP06.phx.gbl... > Sorry I do not have VS 6 at hand , but as I remember it is similar to vc > 7 and 8. Let's try this - in your output window you should see something > like > > Compiling... > > A.cpp > > B.cpp > > [ - post the whole output for compilation of B.cpp here > > .... your errors here, so error happens when you compile B.cpp. > > } > > C.cpp > > > > If I can see the whole output we might deduce the line that triggers the > error. I do not remember exactly but I think the version of WTL that is > compatible with VS6 is 6.x , 7.0 at best , I am reasonably sure 7.5 will > not work > > > > > "ColinG" <csg(a)mine.com> wrote in message > news:um$4EtbgHHA.4260(a)TK2MSFTNGP03.phx.gbl... >> But the errors refer to c:\wtl71\include\atlprint.h. I do not have access >> to the cpp file for atlprint. If you are refering to cpp files in CSG.LIB >> or CSGTEST.dsw then the question would be which ones. >> To post all of them would be a bad idea, IMO. >> >> Which cpp file specifically are you referring to? >> >> Thanks. >> >> Colin >> >> "aao" <aao(a)work.com> wrote in message >> news:u6UTKobgHHA.4980(a)TK2MSFTNGP02.phx.gbl... >>> Sorry I was not clear - what I mean is that you posted compiler errors >>> for the cpp file that is not present -post everything from output window >>> here it might help. BTW what version wtl is that in c:\wtl71\include, >>> it could be that you compiling with wtl version that is incompatible >>> with VC6 >>> >>> "ColinG" <csg(a)mine.com> wrote in message >>> news:ea10tfbgHHA.4596(a)TK2MSFTNGP05.phx.gbl... >>>> Hi, >>>> >>>> Thanks for your reply. >>>> >>>> I included content of CSG.h for CSG.LIB and StdAfx.h for CSGTEST.dsw in >>>> my original posting. I do not understand what other code you require. >>>> >>>> Thanks. >>>> >>>> Colin >>>> >>>> "aao" <aao(a)work.com> wrote in message >>>> news:%23xr1scbgHHA.4064(a)TK2MSFTNGP02.phx.gbl... >>>>> template errors are difficult to diagnose without source code. It >>>>> would be helpful if you publish at least parts of you code here. It >>>>> seems that you program mixes MFC and WTL - but it is only a guess. >>>>> "ColinG" <csg(a)mine.com> wrote in message >>>>> news:ejh0vhagHHA.4900(a)TK2MSFTNGP05.phx.gbl... >>>>>> Hi, >>>>>> >>>>>> I have successfully compiled a static library: CSG.LIB (uses ATL) via >>>>>> VC6. I >>>>>> include the header: CSG.h of CSG.LIB into StdAfx.h of a workspace: >>>>>> CSGTEST.dsw (uses MFC). When I compile CSGTEST.dsw, I receive the >>>>>> following >>>>>> errors: >>>>>> >>>>>> c:\wtl71\include\atlprint.h(871) : error C2664: 'int __thiscall >>>>>> CDC::SelectClipRgn(class CRgn *)' : cannot convert parameter 1 from >>>>>> 'class WTL::CRgnT<1>' to 'class CRgn *' >>>>>> No user-defined-conversion operator available that can perform >>>>>> this conversion, or the operator cannot be called >>>>>> c:\wtl71\include\atlprint.h(854) : while compiling >>>>>> class-template member function 'long __thiscall >>>>>> WTL::CPrintPreviewWindowImpl<class WTL::CPrintPreviewWindow,class >>>>>> ATL::CWindow,class ATL::CWinTraits<1442840576,0> >::OnPaint(unsigned >>>>>> int,uns >>>>>> igned int,long,int &)' >>>>>> c:\wtl71\include\atlprint.h(872) : error C2664: 'FillRect' : cannot >>>>>> convert parameter 2 from 'const int' to 'class CBrush *' >>>>>> Conversion from integral type to pointer type requires >>>>>> reinterpret_cast, C-style cast or function-style cast >>>>>> c:\wtl71\include\atlprint.h(854) : while compiling >>>>>> class-template member function 'long __thiscall >>>>>> WTL::CPrintPreviewWindowImpl<class WTL::CPrintPreviewWindow,class >>>>>> ATL::CWindow,class ATL::CWinTraits<1442840576,0> >::OnPaint(unsigned >>>>>> int,uns >>>>>> igned int,long,int &)' >>>>>> c:\wtl71\include\atlprint.h(874) : error C2664: 'FillRect' : cannot >>>>>> convert parameter 2 from 'struct HBRUSH__ *' to 'class CBrush *' >>>>>> Types pointed to are unrelated; conversion requires >>>>>> reinterpret_cast, C-style cast or function-style cast >>>>>> c:\wtl71\include\atlprint.h(854) : while compiling >>>>>> class-template member function 'long __thiscall >>>>>> WTL::CPrintPreviewWindowImpl<class WTL::CPrintPreviewWindow,class >>>>>> ATL::CWindow,class ATL::CWinTraits<1442840576,0> >::OnPaint(unsigned >>>>>> int,uns >>>>>> igned int,long,int &)' >>>>>> >>>>>> The content of the VC6 ATL static library header: CSG.h is as >>>>>> follows: >>>>>> >>>>>> // *** Start of CSG.h *** >>>>>> >>>>>> #pragma once >>>>>> >>>>>> #ifdef WS_EX_LAYERED >>>>>> #undef WS_EX_LAYERED >>>>>> #endif >>>>>> #define WS_EX_LAYERED 0x00080000 >>>>>> >>>>>> #ifdef LWA_ALPHA >>>>>> #undef LWA_ALPHA >>>>>> #endif >>>>>> #define LWA_ALPHA 0x00000002 >>>>>> >>>>>> #include <atlbase.h> >>>>>> #include <atlapp.h> >>>>>> extern CAppModule _Module; >>>>>> #include <atlwin.h> >>>>>> #include <atlmisc.h> >>>>>> #include <atlctrls.h> >>>>>> #include <atlframe.h> >>>>>> #include <atldlgs.h> >>>>>> #include <atlprint.h> >>>>>> #include <atlctrlx.h> >>>>>> >>>>>> #include <TCHAR.h> >>>>>> >>>>>> #include <vector> >>>>>> #include <deque> >>>>>> #include <map> >>>>>> #include <algorithm> >>>>>> #include <string> >>>>>> #include <fstream> >>>>>> using namespace std; >>>>>> >>>>>> #define EMPTY_STRING _T("") >>>>>> >>>>>> #define MAX_STRING_LEN 24 >>>>>> >>>>>> // Colorref's used in the program >>>>>> #define PINK RGB(255,204,204) >>>>>> #define GREEN RGB(204,255,204) >>>>>> #define BLUE RGB(153,204,255) >>>>>> #define YELLOW RGB(255,255,204) >>>>>> #define WHITE RGB(255,255,255) >>>>>> #define BLACK RGB( 0, 0, 0) >>>>>> #define GREY RGB(125,125,125) >>>>>> >>>>>> // *** End of CSG.h *** >>>>>> >>>>>> The content of StdAfx.h of a VC6 MFC workspace: CSGTEST.dsw is as >>>>>> follows: >>>>>> >>>>>> // *** Start of StdAfx.h *** >>>>>> >>>>>> #if >>>>>> !defined(AFX_STDAFX_H__994FC15C_011D_454F_9501_0FB838CF29D3__INCLUDED_) >>>>>> #define AFX_STDAFX_H__994FC15C_011D_454F_9501_0FB838CF29D3__INCLUDED_ >>>>>> >>>>>> #if _MSC_VER > 1000 >>>>>> #pragma once >>>>>> #endif // _MSC_VER > 1000 >>>>>> >>>>>> #pragma comment(lib, "OLEAUT32") >>>>>> >>>>>> #define WINVER 0x0400 >>>>>> #define _WIN32_IE 0x0400 >>>>>> #define _WIN32_WINNT 0x0400 >>>>>> >>>>>> #include <afxwin.h> // MFC core and standard components >>>>>> #include <afxext.h> // MFC extensions >>>>>> #include <afxdtctl.h> // MFC support for Internet Explorer 4 Common >>>>>> Controls >>>>>> #include <Winsock2.h> >>>>>> >>>>>> #include <gdiplus.h> >>>>>> >>>>>> #include <atlbase.h> >>>>>> >>>>>> using namespace Gdiplus; >>>>>> >>>>>> #ifndef _AFX_NO_AFXCMN_SUPPORT >>>>>> #include <afxcmn.h> // MFC support for Windows Common Controls >>>>>> #endif // _AFX_NO_AFXCMN_SUPPORT >>>>>> >>>>>> #pragma warning(disable:4786) >>>>>> >>>>>> #include "UGExcel.h" >>>>>> #include "ExcelTopHdg.h" >>>>>> #include "ExcelSideHdg.h" >>>>>> #include "WorkBookData.h" >>>>>> #include "DataGridDoc.h" >>>>>> #include "MainFrm.h" >>>>>> #include "DataGridView.h" >>>>>> >>>>>> #include "LicenseInfoDlg.h" >>>>>> >>>>>> extern CWorkBookData g_workBookData; >>>>>> >>>>>> extern CLicenseInfoDlg g_licenseInfoDlg; >>>>>> >>>>>> WINCOMMCTRLAPI HIMAGELIST WINAPI ImageList_Read(LPSTREAM pstm); >>>>>> WINCOMMCTRLAPI BOOL WINAPI ImageList_Write(HIMAGELIST himl, >>>>>> LPSTREAM pstm); >>>>>> >>>>>> #include <commctrl.h> >>>>>> >>>>>> #include <Winspool.h> >>>>>> >>>>>> #include "CSG.h" >>>>>> >>>>>> //{{AFX_INSERT_LOCATION}} >>>>>> // Microsoft Visual C++ will insert additional declarations >>>>>> immediately before the previous line. >>>>>> >>>>>> #endif // >>>>>> !defined(AFX_STDAFX_H__994FC15C_011D_454F_9501_0FB838CF29D3__INCLUDED_) >>>>>> >>>>>> // *** End of StdAfx.h *** >>>>>> >>>>>> Any assistance would be much appreciated. >>>>>> >>>>>> Many thanks. >>>>>> >>>>>> Colin >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > >
First
|
Prev
|
Pages: 1 2 3 Prev: Best way convert Char** to std::string and back Next: LINK : fatal error LNK1104: cannot open file "nafxcwd.lib" |