Compiling with VS.NET 2005 Beta (vs8)

Problems compiling? Don't understand the source code? Don't know how to code your feature? Post here.

Moderator: Moderators

Locked
Guitarm
Forum Moderator
Posts: 385
Joined: 2004-01-18 15:38

Compiling with VS.NET 2005 Beta (vs8)

Post by Guitarm » 2005-01-17 15:37

I'm doing a bit of fiddling/test-compiling with vs8 (it's the vanilla 0.668, sf stlport 4.6.2 and wtl7.5_5002) and I get a bunch of warnings (which I don't care about right now) but I also these errors (obviously FlatTabCtrl seems to be a good candidate for fixing). Are they somewhat easy fixable, or do they need a real surgeon? :wink:

Code: Select all

	Error	17		error C2146: syntax error : missing ';' before identifier 'tabs'	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	19		error C2501: 'FlatTabCtrlImpl<T,TBase,TWinTraits>::tabs' : missing storage-class or type specifiers	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	35		error C2146: syntax error : missing ';' before identifier 'tabs'	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	37		error C2501: 'FlatTabCtrlImpl<T,TBase,TWinTraits>::tabs' : missing storage-class or type specifiers	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	71		error C2440: '=' : cannot convert from 'const wchar_t *' to 'LPTSTR'	c:\Program Files\dctest\original\dcplusplus\windows\ExtendedTrace.cpp	193				
	Error	72		error C2440: '=' : cannot convert from 'const wchar_t *' to 'LPTSTR'	c:\Program Files\dctest\original\dcplusplus\windows\ExtendedTrace.cpp	205				
	Error	88		error C2146: syntax error : missing ';' before identifier 'tabs'	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	90		error C2501: 'FlatTabCtrlImpl<T,TBase,TWinTraits>::tabs' : missing storage-class or type specifiers	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	106		error C2146: syntax error : missing ';' before identifier 'tabs'	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	108		error C2501: 'FlatTabCtrlImpl<T,TBase,TWinTraits>::tabs' : missing storage-class or type specifiers	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	109		fatal error C1903: unable to recover from previous error(s); stopping compilation	c:\Program Files\dctest\original\dcplusplus\client\UserConnection.h	243				
	Error	125		error C2146: syntax error : missing ';' before identifier 'tabs'	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	127		error C2501: 'FlatTabCtrlImpl<T,TBase,TWinTraits>::tabs' : missing storage-class or type specifiers	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	128		fatal error C1903: unable to recover from previous error(s); stopping compilation	c:\Program Files\dctest\original\dcplusplus\client\UserConnection.h	243				
	Error	144		error C2146: syntax error : missing ';' before identifier 'tabs'	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	146		error C2501: 'FlatTabCtrlImpl<T,TBase,TWinTraits>::tabs' : missing storage-class or type specifiers	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	162		error C2146: syntax error : missing ';' before identifier 'tabs'	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	164		error C2501: 'FlatTabCtrlImpl<T,TBase,TWinTraits>::tabs' : missing storage-class or type specifiers	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	165		fatal error C1903: unable to recover from previous error(s); stopping compilation	c:\Program Files\dctest\original\dcplusplus\client\UserConnection.h	243				
	Error	181		error C2146: syntax error : missing ';' before identifier 'tabs'	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	183		error C2501: 'FlatTabCtrlImpl<T,TBase,TWinTraits>::tabs' : missing storage-class or type specifiers	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	184		fatal error C1903: unable to recover from previous error(s); stopping compilation	c:\Program Files\dctest\original\dcplusplus\client\UserConnection.h	243				
	Error	231		error C2146: syntax error : missing ';' before identifier 'tabs'	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	233		error C2501: 'FlatTabCtrlImpl<T,TBase,TWinTraits>::tabs' : missing storage-class or type specifiers	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	249		error C2146: syntax error : missing ';' before identifier 'tabs'	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	251		error C2501: 'FlatTabCtrlImpl<T,TBase,TWinTraits>::tabs' : missing storage-class or type specifiers	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	327		error C2146: syntax error : missing ';' before identifier 'tabs'	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	329		error C2501: 'FlatTabCtrlImpl<T,TBase,TWinTraits>::tabs' : missing storage-class or type specifiers	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	345		error C2146: syntax error : missing ';' before identifier 'tabs'	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	347		error C2501: 'FlatTabCtrlImpl<T,TBase,TWinTraits>::tabs' : missing storage-class or type specifiers	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	363		error C2146: syntax error : missing ';' before identifier 'tabs'	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	365		error C2501: 'FlatTabCtrlImpl<T,TBase,TWinTraits>::tabs' : missing storage-class or type specifiers	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	382		error C2146: syntax error : missing ';' before identifier 'tabs'	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	384		error C2501: 'FlatTabCtrlImpl<T,TBase,TWinTraits>::tabs' : missing storage-class or type specifiers	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	385		fatal error C1903: unable to recover from previous error(s); stopping compilation	c:\Program Files\dctest\original\dcplusplus\client\UserConnection.h	243				
	Error	401		error C2146: syntax error : missing ';' before identifier 'tabs'	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	403		error C2501: 'FlatTabCtrlImpl<T,TBase,TWinTraits>::tabs' : missing storage-class or type specifiers	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	419		error C2146: syntax error : missing ';' before identifier 'tabs'	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	421		error C2501: 'FlatTabCtrlImpl<T,TBase,TWinTraits>::tabs' : missing storage-class or type specifiers	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	571		fatal error C1083: Cannot open include file: 'natupnp.h': No such file or directory	c:\Program Files\dctest\original\dcplusplus\windows\UPnP.h	26				
	Error	587		error C2146: syntax error : missing ';' before identifier 'tabs'	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	589		error C2501: 'FlatTabCtrlImpl<T,TBase,TWinTraits>::tabs' : missing storage-class or type specifiers	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	607		error C2501: 'FlatTabCtrlImpl<T,TBase,TWinTraits>::tabs' : missing storage-class or type specifiers	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	608		fatal error C1903: unable to recover from previous error(s); stopping compilation	c:\Program Files\dctest\original\dcplusplus\windows\WinUtil.cpp	161				
	Error	605		error C2146: syntax error : missing ';' before identifier 'tabs'	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2005-01-18 12:19

These are the only changes in BCDC++ for .NET 2005. It stopped some compiler errors with the Express beta, which was the only version I have access to, not being in the beta team.

Code: Select all

Index: C:/Source/BCDC-svn/client/config.h
===================================================================
--- C:/Source/BCDC-svn/client/config.h	(revision 476)
+++ C:/Source/BCDC-svn/client/config.h	(revision 477)
@@ -33,6 +33,7 @@
 #pragma warning(disable: 4710) // function not inlined
 #pragma warning(disable: 4127) // conditional expression is constant
 #pragma warning(disable: 4503) // decorated name length exceeded, name was truncated
+#pragma warning(disable: 4571) // catch(...) blocks compiled with /EHs do not catch or re-throw Structured Exceptions
 
 #ifndef CDECL
 #define CDECL _cdecl
@@ -90,7 +91,7 @@
 
 
 // These are defined by the C99 standard, but vc 6.0/7.0/7.1 doesn't understand them
-#if _MSC_VER == 1200 || _MSC_VER == 1300 || _MSC_VER == 1310
+#if _MSC_VER == 1200 || _MSC_VER == 1300 || _MSC_VER == 1310 || _MSC_VER == 1400
 typedef signed char int8_t;
 typedef signed short int16_t;
 typedef signed long int32_t;

Guitarm
Forum Moderator
Posts: 385
Joined: 2004-01-18 15:38

Post by Guitarm » 2005-01-18 12:54

Ok, yes the _MSC_VER_ I managed to figure out myself. I'll try that #pragma too, Thanks!
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."

Guitarm
Forum Moderator
Posts: 385
Joined: 2004-01-18 15:38

Post by Guitarm » 2005-01-18 13:43

Ok, It seems to boil down to these three errors now:

Code: Select all

	Error	11		error C2146: syntax error : missing ';' before identifier 'tabs'	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553				
	Error	13		error C2501: 'FlatTabCtrlImpl<T,TBase,TWinTraits>::tabs' : missing storage-class or type specifiers	c:\Program Files\dctest\original\dcplusplus\windows\FlatTabCtrl.h	553		
	Error	19		error C2440: '=' : cannot convert from 'const wchar_t *' to 'LPTSTR'	c:\Program Files\dctest\original\dcplusplus\windows\ExtendedTrace.cpp	205				
Any hints on how to overcome them?. I just thought it would be fun to see what the compiler produces :)
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."

Guitarm
Forum Moderator
Posts: 385
Joined: 2004-01-18 15:38

Post by Guitarm » 2005-01-19 09:58

Ok, forget about the former post, I've fixed them and got the debug version compiled. Now on to the release version, these are the errors :

Code: Select all

Error 2 error C2757: '__std_alias' : a symbol with this name already exists and therefore this name cannot be used as a namespace name	C:\Program Files\dctest\includes\stl\DCPlusPlus-STLPort-4.6.2\cstdio 46
Error 3 error C2039: 'vsnprintf' : is not a member of 'std'	C:\Program Files\dctest\includes\stl\DCPlusPlus-STLPort-4.6.2\cstdio 117
Error 6 error C2757: '__std_alias' : a symbol with this name already exists and therefore this name cannot be used as a namespace name	C:\Program Files\dctest\includes\stl\DCPlusPlus-STLPort-4.6.2\cstdio 46
Error 7 error C2039: 'vsnprintf' : is not a member of 'std'	C:\Program Files\dctest\includes\stl\DCPlusPlus-STLPort-4.6.2\cstdio 117
Error 8 error C2873: 'vsnprintf' : symbol cannot be used in a using-declaration	C:\Program Files\dctest\includes\stl\DCPlusPlus-STLPort-4.6.2\cstdio 117
Error 4 error C2873: 'vsnprintf' : symbol cannot be used in a using-declaration	C:\Program Files\dctest\includes\stl\DCPlusPlus-STLPort-4.6.2\cstdio 117
Is this a sign of some collision between vs's STL and STLPort, or?
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."

PseudonympH
Forum Moderator
Posts: 366
Joined: 2004-03-06 02:46

Post by PseudonympH » 2005-01-19 13:31

Seems like some sort of problem between the native library and STLPort.

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2005-01-19 13:41

Since you're already on the bleeding edge: http://stlport.com/beta/

Guitarm
Forum Moderator
Posts: 385
Joined: 2004-01-18 15:38

Post by Guitarm » 2005-01-19 15:21

Ok, I downloaded STLport-5.0-1031, tried and got these results:

Code: Select all

	Error	4		error C2373: 'vsnprintf' : redefinition; different type modifiers	C:\Program Files\dctest\includes\stl\STLport-5.0-1031\STLport-5.0-1031\stlport\cstdio	48				
	Error	5		error C2039: '_vsnprintf' : is not a member of 'std'	C:\Program Files\dctest\includes\stl\STLport-5.0-1031\STLport-5.0-1031\stlport\cstdio	49				
	Error	6		error C2039: 'vsnprintf' : is not a member of 'std'	C:\Program Files\dctest\includes\stl\STLport-5.0-1031\STLport-5.0-1031\stlport\cstdio	115				
	Error	7		error C2873: 'vsnprintf' : symbol cannot be used in a using-declaration	C:\Program Files\dctest\includes\stl\STLport-5.0-1031\STLport-5.0-1031\stlport\cstdio	115				
	Error	10		error C2039: '_vsnprintf' : is not a member of 'std'	C:\Program Files\dctest\includes\stl\STLport-5.0-1031\STLport-5.0-1031\stlport\cstdio	49				
	Error	11		error C2039: 'vsnprintf' : is not a member of 'std'	C:\Program Files\dctest\includes\stl\STLport-5.0-1031\STLport-5.0-1031\stlport\cstdio	115				
	Error	12		error C2873: 'vsnprintf' : symbol cannot be used in a using-declaration	C:\Program Files\dctest\includes\stl\STLport-5.0-1031\STLport-5.0-1031\stlport\cstdio	115				
	Error	9		error C2373: 'vsnprintf' : redefinition; different type modifiers	C:\Program Files\dctest\includes\stl\STLport-5.0-1031\STLport-5.0-1031\stlport\cstdio	48				
So this part in cstdio seems to be the affecting one:

Code: Select all

#  if defined (_STLP_MSVC) || defined (__ICL)
inline
int vsnprintf(char *s1, size_t n, const char *s2, va_list v)
{
return _STLP_VENDOR_CSTD::_vsnprintf(s1, n, s2, v);
}
#  endif
I assume that "std" means the std namespace, or?. Anyways if I take a look in stdio.h I find this:

Code: Select all

_CRT_INSECURE_DEPRECATE _CRTIMP int __cdecl vsnprintf(char *, size_t, const char *, va_list);
_CRTIMP int __cdecl vsnprintf_s(char *, size_t, size_t, const char *, va_list);
_CRT_INSECURE_DEPRECATE _CRTIMP int __cdecl _vsnprintf(char *, size_t, const char *, va_list);
_CRTIMP int __cdecl _vsnprintf_s(char *, size_t, size_t, const char *, va_list);
Which indicates a deprecation of the before used vsnprintf and _vsnprintf and addition of vsnprintf_s and _vsnprintf_s (I hope I'm correct in these assumptions..). The new one's has an added size_t type. There are other variations like :

Code: Select all

_CRTIMP int __cdecl vsprintf_s(char *, size_t, const char *, va_list);
and

Code: Select all

_CRTIMP int __cdecl _vsnprintf_c(char *, size_t, const char *, va_list);
But when trying them I get the same errors as before so......any help is appreciated
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2005-01-20 14:02

I'm content to wait until it's announced, and STLPort has been tested....

Unless vsnprintf is referenced in code that DC++ uses, you can just comment the whole thing out.

You're on the bleeding edge, enjoy it. ;)

Guitarm
Forum Moderator
Posts: 385
Joined: 2004-01-18 15:38

Post by Guitarm » 2005-01-21 08:28

Yes, thanks for the tip. I've had a bad virus attack here. I had to reinstall the whole OS, infected 580 files, half of my installed apps and (as I discovered) also OS files resulting in the OS breaking down completely (funny, funny). But as soon as I have the system up and running again I'll try some things out
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."

Locked