Asaf
Sleep Deprived
- Joined
- Mar 22, 2010
- Messages
- 1,326
(Warning: some technical stuff ahead)
I think we can compile the DLL with newer VC++ tool kits than 2003, which means that there's no more need to look for old files and platforms, and there's no need for a makefile (since we can use the Visual Studio regular Win32 DLL project).
I will test all of what I write here later on when I have the chance, but I'm not sure if my test will be enough, so I'd like to hear other people's opinions on this.
I'll explain:
The current compilation flags include /MD, which means that the runtime library used is the multi-threaded DLL. This means that the runtime library code is not embedded in the CvGameCoreDLL but is loaded as a separate DLL when the process runs.
I assume that the game's exe file uses the same compilation flag, so the the same runtime library DLL (VC++ 2003) is loaded for the exe. This means that we cannot change the VC++ version of the CvGameCoreDLL since two conflicting runtime library DLL's will be loaded for the game.
I suggest changing this flag to /MT - which will embed the runtime library code into the CvGameCoreDLL itself. This will mean that no such conflict can be created even if we use a newer VC++ runtime library (2005, 2008).
It will cause the CvGameCoreDll to be slightly bigger, the game will take a little more memory when running, and people who use the new compiled DLL will need to make sure they have the VC++ appropriate redistributable installed (EDIT: I guess this is not the case, since the runtime will be embedded in the DLL).
But it will be much easier to start compiling the DLL.
The main problem I see here are the boost and python libraries which are linked into the DLL. They will need to be replaced to the correct VC++ version as well, and I'm not sure if this will cause any conflicts.
Has this been attempted before? Do you think it'll work properly? is this way preferred?
I think we can compile the DLL with newer VC++ tool kits than 2003, which means that there's no more need to look for old files and platforms, and there's no need for a makefile (since we can use the Visual Studio regular Win32 DLL project).
I will test all of what I write here later on when I have the chance, but I'm not sure if my test will be enough, so I'd like to hear other people's opinions on this.
I'll explain:
The current compilation flags include /MD, which means that the runtime library used is the multi-threaded DLL. This means that the runtime library code is not embedded in the CvGameCoreDLL but is loaded as a separate DLL when the process runs.
I assume that the game's exe file uses the same compilation flag, so the the same runtime library DLL (VC++ 2003) is loaded for the exe. This means that we cannot change the VC++ version of the CvGameCoreDLL since two conflicting runtime library DLL's will be loaded for the game.
I suggest changing this flag to /MT - which will embed the runtime library code into the CvGameCoreDLL itself. This will mean that no such conflict can be created even if we use a newer VC++ runtime library (2005, 2008).
It will cause the CvGameCoreDll to be slightly bigger, the game will take a little more memory when running, and people who use the new compiled DLL will need to make sure they have the VC++ appropriate redistributable installed (EDIT: I guess this is not the case, since the runtime will be embedded in the DLL).
But it will be much easier to start compiling the DLL.
The main problem I see here are the boost and python libraries which are linked into the DLL. They will need to be replaced to the correct VC++ version as well, and I'm not sure if this will cause any conflicts.
Has this been attempted before? Do you think it'll work properly? is this way preferred?