Ca3DE and (system) DLLs

Get help with installing and running the Cafu Engine here. This forum is also for general questions and discussion of all aspects regarding the Cafu Engine.
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:
Ca3DE and (system) DLLs

Post by Carsten » 2006-08-08, 16:47

Hi all,

here is some information for consideration and discussion about some changes that I plan to apply to the Ca3DE related executables.


Summary

With future Ca3DE releases (both SDK and demo), some users will see an error message popping up when they double-click on any Ca3DE releated executable. (TODO: Insert a screenshot of the error message box here.)
In order to resolve the problem, they'll have to download and install the file at http://go.microsoft.com/fwlink/?linkid= ... lcid=0x409
I'll update the documantation and download descriptions as soon as this becomes effective.


Cause of the Problems

All Ca3DE related MS Windows executables used to statically link to the C/C++ Runtime Library (CRT) before. This means that the CRT was contained inside of each .exe file where is was available to the main program of the exe.

Now, the same executables still need the functions of the CRT, but they don't "contain" the CRT anymore - they now link dynamically to it. That means that the CRT must be available in the form of some DLLs, which in turn must be found somewhere on the users hard-disk. Therefore, the above mentioned program installs all required files in the right places. This is necessary only once.


Why Ca3DE? (And not other programs?)

Almost all programs on your computer need access to a CRT (except for very few very special ones). Those that link statically to the CRT will never have a need to look for it in a DLL on disk, and are safe. I will adress the question on why Ca3DE programs don't link statically to the CRT anymore below.

So lets assume that Ca3DE programs link dynamically to the CRT, as most other Windows programs do. Then the answer to the problem is that Ca3DE is build with the fairly modern Microsoft Visual C/C++ 2005 compiler. The CRT DLLs are in fact a part of this compiler, and therefore it is obvious that older versions of Windows (from 95 to XP) cannot have these files pre-installed, whereas most versions of Windows bring the required DLLs for the widely-used but older VC6 compiler with them.

Commercial applications (will) solve this very problem by redistributing the required DLLs as part of their installer packages. This is also the reason why not everybody will suffer this problem: If you happen to have installed an application that already installed the required DLLs, which are shared among all programs on your system, then the Ca3DE programs will work right away.

However, I currently don't want to ship the Ca3DE demo and SDK with a complete Windows Installer (but rather stay with the well-known .zip files), and therefore, if the CRT DLLs have not yet been installed on your system, you'll have to download and install the above file.

These links have additional, very detailed information:
http://blogs.msdn.com/aymans/archive/20 ... 68466.aspx
http://blogs.msdn.com/martynl/archive/2 ... 80880.aspx


Why the change to dynamically linking the CRT?

[I'll elaborate on this later.]
Best regards,
Carsten
Post Reply

Who is online

Users browsing this forum: No registered users and 110 guests