Upgrading source to VS2010
I am going to dive into the source, I have good knowledge of programming (I am a Technical Computer Science student). I already did some programming assignments, but I am not completely familiar with c++.
I am going to upgrade the source first so I can edit in VS2010 and I was wondering what the best strategy is for this, I mean I read thread about it, heard people talk about updating SDK first, libraries and doing things first in vs2003. Well as I am not wanting to do things wrong, yes I know that people learn from mistakes, so I wanted to know how to do things.
Ok where am I so far:
- I got VS2003 installed on my XP machine and it compiles the source without errors.
- I use spikenbrors clean v15 source.
- I did not do any source edit yet.
- I got VS2010 ultimate installed and installed it's updates provided by microsoft (windows update does not cry to tell me it has any more updates)
What would be next on the list:
- Opening it in VS2010 and go compile and fix errors?
- Upgrading the source in VS2003 and upgrade the libraries DX SDK
- Some other step?
I hope I will succeed, I am willing to learn anything and as I told you I know how to program (write code). I know PHP, JAVA (basics), Python(basics).
Thank you in advance.
Btw: When I completely got my source compiling in VS2010 I will make a guide about it so other people can upgrade their source as well. I think that will benefit the community, and mostly the people who want to work on their sources and not just leech precompiled exe's.
Re: Upgrading source to VS2010
Quote:
Originally Posted by
Langstra
Btw: When I completely got my source compiling in VS2010 I will make a guide about it so other people can upgrade their source as well. I think that will benefit the community, and mostly the people who want to work on their sources and not just leech precompiled exe's.
That is why I will not help you. If you make a guide, some idiot will follow it and then release the source completely converted. It's easy enough to convert it already... It took max 2 days of fiddling with it to get it compiled in vs2010 and I don't have much C++ experience(around a year now). No one "needs" tips, just do it yourself if you want to learn. You'll learn a lot less if I write a guide on how to do it, rather than you figuring it out for yourself.
Re: Upgrading source to VS2010
Quote:
Originally Posted by
xLethal
That is why I will not help you. If you make a guide, some idiot will follow it and then release the source completely converted. It's easy enough to convert it already... It took max 2 days of fiddling with it to get it compiled in vs2010 and I don't have much C++ experience(around a year now). No one "needs" tips, just do it yourself if you want to learn. You'll learn a lot less if I write a guide on how to do it, rather than you figuring it out for yourself.
I kinda agree with him. As you already know, I'm currently doing the same thing. I know even less about C++ than xLethal and I'd say I am learning a lot while doing this. Giving a guide for people to follow is less helpful than them figuring it out for themselves.
Also, I don't know if it's the proper way, but I started by loading it up in VS2010, let it autoconvert the project files to the new version, and started compiling/fixing errors. When I hit errors related to the Boost SDK, I downloaded and updated that (although I don't think I'm finished with it).
Re: Upgrading source to VS2010
Okay thanks, it was not like I was going to tell them how to fix every error in detail. Just some guide so that they have to figure things out them self, just as I am going to do, except that they might be done a little quicker as I still need the beginners start up.
Well I got it loaded in VS2010 and converted, ran into the first error, something with
Code:
1> Touching ".\..\..\Output\AccountServer\Release\AccountServer.unsuccessfulbuild".
And then
Code:
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winnt.h(290): error C2146: syntax error : missing ';' before identifier 'PVOID64'
That must have something to do with the SDK BOOST right?. I mean the path says Microsofts SDKs. I will get into it tomorrow.
Re: Upgrading source to VS2010
actually your biggest problem you will encounter is the breaking changes from 2003-2005. So many stupid errors that you will catch real fast and some you will have to look up like I did. One I will tell you is the DX9 stuff is changed in vs2010 (at least for mine)
As a matter of fact I have a thread somewhere either I or someone started about converting this to vs2010
Re: Upgrading source to VS2010
I still have not been able to solve the error, could anybody help me?
I have tried to upgrade my DX SDK and my BOOST SDK, but I still get the same error.
Errors:
Re: Upgrading source to VS2010
Ah, I just looked that one up on the internet. it's a slight problem in the Windows SDK.
Double click that first error, and put the following line just above the problem area:
Code:
#define POINTER_64 __ptr64
Re: Upgrading source to VS2010
Quote:
Originally Posted by
ShadowDragon42
Ah, I just looked that one up on the internet. it's a slight problem in the Windows SDK.
Double click that first error, and put the following line just above the problem area:
Code:
#define POINTER_64 __ptr64
Thanks mate, I am solving going to try and solve the other errors now. I ran into errors with the strcpy to strcpy_s function. At some points it work and at other points it says,
Code:
1>AccountServer.cpp(357): error C2660: 'strcpy_s' : function does not take 2 arguments
I found out that the definition is else, because at the points where it works the definition is defined in crtdefs.h with this code
Code:
#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1(_ReturnType, _FuncName, _DstType, _Dst, _TType1, _TArg1) \
extern "C++" \
{ \
template <size_t _Size> \
inline \
_ReturnType __CRTDECL _FuncName(_DstType (&_Dst)[_Size], _TType1 _TArg1) _CRT_SECURE_CPP_NOTHROW \
{ \
return _FuncName(_Dst, _Size, _TArg1); \
} \
}
And where it does not work I get referenced to that error and when I see where it is defined it says it is in string.h
As you are also upgrading the function strcpy to strcpy_s you will most likely know what the problem is. I am thanking you for the help.
Re: Upgrading source to VS2010
you don't really HAVE to do those, that's just upgrading to secure functions. the source will still compile if you ignore them.
but as for the problem, I just add an argument in the middle, which is the size of the destination string. so
Code:
strcpy( arg1, arg2 )
becomes
Code:
strcpy_s( arg1, sizeof( arg2 ), arg2 )
be sure NOT to do this for anything related to strcat (concatenation)
for that, you need the size of both elements added together (but only do this if it gives you an error about the number of arguments). In some cases, as you have noticed, it can already determine the size of the string (because arg1 is something like char[size], and it can check the size)
Re: Upgrading source to VS2010
Quote:
Originally Posted by
ShadowDragon42
you don't really HAVE to do those, that's just upgrading to secure functions. the source will still compile if you ignore them.
Yes I know, but as I am trying to get it compiling I can just as well try to get this right, not? I mean it should make the game more stable as you already said in your own tread.
Thanks for your help once again.