Friday, May 21, 2010

C++ Builder Executable problem?

My problem seems complicated but I will try to explain it.





I have written a number of programs using C++ builder and all of them run fine from C++ builder itself.





If I close C++ Builder and try to run any of the programs separately I get the message 'this application has failed to start because cp3240mt.dll was not found.Re-installing the application may fix this problem'.





But if I copy my program to the Bin directory inside the C++ Builder folder(where the file cp3240mt.dll is located) the program runs fine.They seem to only run inside the Bin directory.





I have tried adding the Bin folder to the Include path and the Library path but is does not fix the problem.Is it maybe another setting I have to change?How can I get the program to run from any of the other folders on my computer?

C++ Builder Executable problem?
Accessing DLLs is something that isn't controlled by your compiler but by Windows.





Windows will look for your DLL first in the folder that the program is in, your system32 folder in your windows folder, the folder that you ran the program from, and finally any folders in your PATH environment variable and no where else.
Reply:Does not look easy. May be you can contact a windows expert at websites like http://askexpert.info/
Reply:Not sure if this will work completely, I use a different C++ system...





However, the DLL should be in the same folder as the .exe





Try copying the DLL to another folder w/ the exe you are using. It should work. (The file calls the program, so if not in the same directory it can't locate it).


No comments:

Post a Comment