Saturday, May 9, 2009

How to attach needed DLL files in Borland C++ Builder 6?

I wrote a program in Borland C++ Builder 6, but I can run the compiled application just on my own computer, on other computers it asks for some dll files !


How I can attach these files automatically to my application ?

How to attach needed DLL files in Borland C++ Builder 6?
Been there done that. Fortunately, there is an easy solution here.





On your computer with the compilier, open up the project.





Go to "Project-%26gt;Options..."





Click on the "Packages" tab and unclick "Build with runtime packages" checkbox.





Click on the "Linker" tab and unclick the "Use dynamic RTL" checkbox.





Save all and compile. The resulting executable will be bigger, but will not give you the same problems.





The reason that this is happening is that the default behavior of the compiler is to use DLL's for the C/C++ runtime library. Your computer, since it has the compiler installed has these DLL's. If you just copy the executable, the runtime DLL's don't get copied, and the program won't run on a machine that does not have the compiler installed.





The instructions that I have given tell the compiler to directly link in the runtime library so that you program will stand on its own.
Reply:when you transfert the application transfert the DLL files


No comments:

Post a Comment