Board index » Visual Studio » General problem compiling sample apps in 2005

General problem compiling sample apps in 2005

Visual Studio111
Recently I felt fortunate that I was provided VS2005 from my employer

but ever since I have been unable to compile almost every sample I

download from msdn, codeproject, codeguru, etc. I know this is a

general complaint but every time there is a new problem. Here is the

most recent one. I downloaded the scheduler sample at

msdn.microsoft.com/library/default.asp

and got the error:



Error 1 error C2768: 'SerializeElements' : illegal use of explicit

template arguments c:\program files\visual studio .net

2002\samples\visual c++ samples\mfc_internet_scheduler\scheduler.h 30



I tried to run about 5 sample projects this morning and, after

conversion, they all got different errors. Maybe I changed some

program settings that I shouldn't have. If this is going to be an

ongoing problem is there a place I can find samples exclusively made

for VS2005? In the meantime does anyone know what might be causing the

error above?


-
 

Re:General problem compiling sample apps in 2005

"djohnson" <onlinefuel@gmail.com>wrote in message

Quote
Recently I felt fortunate that I was provided VS2005 from my employer

but ever since I have been unable to compile almost every sample I

download from msdn, codeproject, codeguru, etc.



If this is going to be an

ongoing problem is there a place I can find samples exclusively made

for VS2005? In the meantime does anyone know what might be causing the

error above?





Check if your employer will also provide you with VS2003. It's best to have

both, as you're finding. If your employer has an MSDN subscription, VS2003

is automatically included (as well as VS2005). Many of us are choosing to

stay with VS2003 for native code (like C++/MFC) because VS2005 has little

advantage and is way slower besides, unless you have lots of RAM.



If you can install VS2003, you may want to uninstall VS2005 first. It works

best if you install first VS2003, then VS2005.



There is also a newly released VS2003 SP1, but I've not installed it yet.





-- David





-

Re:General problem compiling sample apps in 2005



David Ching wrote:

Quote
"djohnson" <onlinefuel@gmail.com>wrote in message

news:1156609842.944170.45630@h48g2000cwc.googlegroups.com...

>Recently I felt fortunate that I was provided VS2005 from my employer

>but ever since I have been unable to compile almost every sample I

>download from msdn, codeproject, codeguru, etc.



>If this is going to be an

>ongoing problem is there a place I can find samples exclusively made

>for VS2005? In the meantime does anyone know what might be causing the

>error above?

>



Check if your employer will also provide you with VS2003. It's best to have

both, as you're finding. If your employer has an MSDN subscription, VS2003

is automatically included (as well as VS2005). Many of us are choosing to

stay with VS2003 for native code (like C++/MFC) because VS2005 has little

advantage and is way slower besides, unless you have lots of RAM.



If you can install VS2003, you may want to uninstall VS2005 first. It works

best if you install first VS2003, then VS2005.



There is also a newly released VS2003 SP1, but I've not installed it yet.





-- David



I did get it with the MSDN subscription. I will look for 2003 in it

next chance I get. Maybe MS should have made the conversion process

more robust. Thank you for the advice.



-

Re:General problem compiling sample apps in 2005



"djohnson" <onlinefuel@gmail.com>skrev i meddelandet

Quote
Recently I felt fortunate that I was provided VS2005 from my

employer

but ever since I have been unable to compile almost every sample I

download from msdn, codeproject, codeguru, etc. I know this is a

general complaint but every time there is a new problem. Here is

the

most recent one. I downloaded the scheduler sample at

http://msdn.microsoft.com/library/default.asp?url" rel="nofollow" target="_blank">msdn.microsoft.com/library/default.asp=/library/en-us/vcsample/html/vcsamSchedulerSample.asp

and got the error:



Error 1 error C2768: 'SerializeElements' : illegal use of explicit

template arguments c:\program files\visual studio .net

2002\samples\visual c++ samples\mfc_internet_scheduler\scheduler.h

30



I tried to run about 5 sample projects this morning and, after

conversion, they all got different errors. Maybe I changed some

program settings that I shouldn't have. If this is going to be an

ongoing problem is there a place I can find samples exclusively made

for VS2005? In the meantime does anyone know what might be causing

the

error above?





The code is just broken. It is illegal C++, but VS2002 was equally

broken and didn't notice.





If you check the help for C2768 it shows how to fix the problem.



Generally though, code for VC6 and VS2002 is not recommended for

learning C++. The language has changed, the compilers have not.





Bo Persson





-

Re:General problem compiling sample apps in 2005

I get these errors on occasion, but I typically just fix the programs or

look at the code I need and try to divine it without compiling it. The

samples are still really useful and most of them (unless they for scope

variable problems or something) compile pretty easily. I think it is

annoying to have multiple versions of VS loaded so I try to avoid that.



Tom



"djohnson" <onlinefuel@gmail.com>wrote in message

Quote
Recently I felt fortunate that I was provided VS2005 from my employer

but ever since I have been unable to compile almost every sample I

download from msdn, codeproject, codeguru, etc. I know this is a

general complaint but every time there is a new problem. Here is the

most recent one. I downloaded the scheduler sample at

http://msdn.microsoft.com/library/default.asp?url" rel="nofollow" target="_blank">msdn.microsoft.com/library/default.asp=/library/en-us/vcsample/html/vcsamSchedulerSample.asp

and got the error:



Error 1 error C2768: 'SerializeElements' : illegal use of explicit

template arguments c:\program files\visual studio .net

2002\samples\visual c++ samples\mfc_internet_scheduler\scheduler.h 30



I tried to run about 5 sample projects this morning and, after

conversion, they all got different errors. Maybe I changed some

program settings that I shouldn't have. If this is going to be an

ongoing problem is there a place I can find samples exclusively made

for VS2005? In the meantime does anyone know what might be causing the

error above?







-

Re:General problem compiling sample apps in 2005



"Tom Serface" <tserface@msn.com>wrote in message

Quote
I get these errors on occasion, but I typically just fix the programs or

look at the code I need and try to divine it without compiling it. The

samples are still really useful and most of them (unless they for scope

variable problems or something) compile pretty easily. I think it is

annoying to have multiple versions of VS loaded so I try to avoid that.





Really? Why is having multiple VS installed annoying? It works great for

me.



There are so many great samples to download these days, I don't have time to

mess with getting them to build. If they don't build right away, I throw it

away and go on to the next one.



Thanks,

David





-