Re: HELP: Visual Studio.NET 2003 building woes .... :S
- From: David Wilkinson <no-reply@xxxxxxxxxxxx>
- Date: Tue, 07 Mar 2006 06:41:23 -0500
KevinGPO wrote:
Thanks. I manage to fix some of these errors. There's still some errors that
buffle me.
1. DLL creation:
HGBaseu.def(76): fatal error LNK1118: syntax error in '70' statement
(points to)
?CreateThreadProcessor@CGeneralTimerThreadQueue@@MAEPAVCGeneralTimerThread@@V
CHGVoidCall@@J@Z 70 NONAME
2. Originally it said ostream cannot be inline so I commented that out.
However I don't understand the errors:
GUID.h(54): error C2143: syntax error : missing ';' before '&'
GUID.h(54): error C2501: 'ostream' : missing storage-class or type specifiers
GUID.h(54): error C2065: 'strm' : undeclared identifier
GUID.h(54): error C2065: 'ID' : undeclared identifier
GUID.h(54): error C2275: 'CGUID' : illegal use of this type as an expression
GUID.h(54): error C2501: 'operator`<<'' : missing storage-class or type
specifiers
GUID.h(54): error C2365: 'operator`<<'' : redefinition; previous definition
was a 'member function'
GUID.h(54): error C2078: too many initializers
GUID.h(55): error C2143: syntax error : missing ';' before '{'
GUID.h(55): error C2447: '{' : missing function header (old-style formal
list?)
(all points to)
/*inline*/ ostream& operator<<(ostream& strm,CGUID& ID)
{
return strm<< (CString)ID;
}
3. Some problems with namespaces:
SortedArray2.h(75): error C2039: '[]' : is not a member of 'operator``global
namespace'''
(points to)
inline TYPE& CSortedArray2<TYPE>::operator[](int nIndex)
{
return m_InternalArray[nIndex];
}
I get a lot of repeated errors of the above 3 plus lots of template errors. I
believe Visual C++ 6.0 didn't comply with the C++ standards on how to define
templates right?
"David Wilkinson" <no-reply@xxxxxxxxxxxx> wrote in message news:uQRnXhSQGHA.2992@xxxxxxxxxxxxxxxxxxxxxxx
KevinGPO wrote:
My application was developed under Visual C++ 6.0, ATL, MFC & PlatformSDK Feb2003 (the last VC6 compatible version).
I am wondering if PlatformSDK Feb2003 is compatible with Visual Studio.NET 2003? I am having major problems trying to port/build my application under Visual Studio.NET 2003 using the unmanaged/native C++ compiler.
I was told that Visual Studio.NET 2003 had native C++ compiler support. I am aware about the new C++ 1999 changes (eg. #include <iostream>, using namespace std; etc). However my errors seem to be related to the PlatformSDK Feb2003. eg:
error C2039: 'Delete' : is not a member of 'CCommandEx<TAccessor>' with [TAccessor=ATL::CManualAccessor]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error C2065: 'AFX_OLE_DATETIME_ERROR' : undeclared identifier
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error C2143: syntax error : missing ',' before '<'
NOTE: what is this issue about templates??? my templates are like:
<code snip>
template <class TAccessor = CNoAccessor, template <typename T> class TRowset = CRowset>
class CAccessorRowset :
public TAccessor,
public TRowset<TAccessor> // error C2143
{
<code snip>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error C2440: 'type cast' : cannot convert from 'CFile' to 'HFILE'
<code snip>
if ((HFILE)File==CFile::hFileNull)
<code snip>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error C2475: 'CDouble::GetDoubleValue' : forming a pointer-to-member requires explicit use of the address-of operator ('&') and a qualified name
<code snip>
if(Value.GetDoubleValue != 0)
<code snip>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error C2516: 'TRowset' : is not a legal base class
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
and there's more. What was wrong with Visual C++ 6.0? and why is there so many errors when trying to compile under Visual Studio.NET 2003? Does anyone know a quick conversion script?
Kevin:
Please don't cross-post.
Why do you think this has to do with the PSDK? Most of these errors seem to be C++ compiler issues. Have you tried to fix them? For example, looking at the CFile source I see in VC6
UINT m_hFile;
operator HFILE() const;
and in VC7.1
HANDLE m_hFile;
operator HANDLE() const;
David Wilkinson
Kevin:
Clearly there is something wrong with the way you have declared the function
ostream& operator <<(ostream& strm, CGUID& ID)
If the declaration is inside the CGUID class, it should be a friend. But if the CString conversion is public, the declaration does not need to be inside the class.
David Wilkinson
.
- References:
- Re: HELP: Visual Studio.NET 2003 building woes .... :S
- From: David Wilkinson
- Re: HELP: Visual Studio.NET 2003 building woes .... :S
- From: KevinGPO
- Re: HELP: Visual Studio.NET 2003 building woes .... :S
- Prev by Date: Re: Using VC7.1 compiler under VC6 IDE.... woes.... :S
- Next by Date: Re: Post Message from Property Sheet to another
- Previous by thread: Re: HELP: Visual Studio.NET 2003 building woes .... :S
- Next by thread: Using DLLs
- Index(es):
Relevant Pages
|