Board index » cppbuilder » When does deploying need cp3245mt.dll and borlndmm.dll?
Sally
![]() CBuilder Developer |
Sally
![]() CBuilder Developer |
When does deploying need cp3245mt.dll and borlndmm.dll?2006-05-12 03:22:42 PM cppbuilder51 I have a multithreaded application, across several statically AND dynamically linked BPLs, Libs, and the EXE. Do I need to include the cp3245mt.dll and borlndmm.dll.... my old old manuals mentioned the deployment of these files but the new manual doesn't seem to mention them in the deomployment list. |
Ed Mulroy
![]() CBuilder Developer |
2006-05-12 06:13:23 PM
Re:When does deploying need cp3245mt.dll and borlndmm.dll?
Yes. Dynamic linked programs still require those DLL's.
. Ed QuoteSally wrote in message |
Sally
![]() CBuilder Developer |
2006-05-12 07:09:57 PM
Re:When does deploying need cp3245mt.dll and borlndmm.dll?
Well the problem is that I'm trying to transition the whole thing into
Static standalone EXE... that does not rely on any external Borland files. When I turn off "runtime" packages, and add the vcl, vclx, and vcljpg libraries into my project directly, what I end up with is a strange access violation ONLY when I use TPopupMenu... is that in some other library that I should know about or something? The strange thing is, the entire project worked fine either way in BorlandC++Builder4... all these confusions and problems started when I updated to BCB6 {smallsort} |
Sally
![]() CBuilder Developer |
2006-05-12 07:35:11 PM
Re:When does deploying need cp3245mt.dll and borlndmm.dll?
PS, the reason I want it standalone is because as far as I can tell,
this is all the files I need to distribute: cp3245mt.dll borlndmm.dll rtl60.bpl vcl.bpl vclx.bpl bcbsmp.bpl vcljpg.bpl And essentially it is 1-2mb larger than if I all do it static. But I get access violations if I do... and I checked TDump and its not importing any other BPLs that I missed so I have no idea why it is not working. |
Sally
![]() CBuilder Developer |
2006-05-12 07:58:00 PM
Re:When does deploying need cp3245mt.dll and borlndmm.dll?
Arg.... now I'm really confused and scratching my head.
TDump imports show I don't need cp3245mt.dll and borlndmm.dll, because my "dynamic rtl" options are all OFF. So I know I they wont be USED if I distribute them because tdump's import section says they won't be used. But the question is, do I HAVE to turn ON the "dynamic rtl" options if I have a multi-threaded program? Or is rtl60.bpl basically a replacement for the other DLLs and can handle multithreads? I wish there was a primer page that was up to date for BC++Builder6 and addressed all this confusion. |
Roddy Pratt
![]() CBuilder Developer |
2006-05-12 09:51:35 PM
Re:When does deploying need cp3245mt.dll and borlndmm.dll?
"Sally" < XXXX@XXXXX.COM >wrote in message
QuoteWell the problem is that I'm trying to transition the whole thing into QuoteWhen I turn off "runtime" packages, and add the vcl, vclx, and vcljpg options. ... and I think you must make sure any of your own libraries that you use are linked the same way. Maybe the TPopupMenu AV is a real bug in your code...? Quote
- Roddy |
Sally
![]() CBuilder Developer |
2006-05-13 06:28:23 AM
Re:When does deploying need cp3245mt.dll and borlndmm.dll?QuoteYou shouldn't need to add these libraries to your project directly. components inside vclx. What do you think this could mean then? QuoteMaybe the TPopupMenu AV is a real bug in your code...? just had "new TPopupMenu" and it would give me an access violation inside the new call. When I use EXTERNAL rtl60.bpl and vcl.bpl, the problem goes away and CodeGuard shows no signs of problems anywhere. By the way Roddy, do you know if I dynamically link to rtl60.bpl and vcl60.bpl, and the rest are static linked libraries, if I need to use cc/cp3245mt.dll, borlndmm.dll, or if I must be forced to turn on "use dynamic rtl" options? |
Roddy
![]() CBuilder Developer |
2006-05-13 04:34:57 PM
Re:When does deploying need cp3245mt.dll and borlndmm.dll?
"Sally" < XXXX@XXXXX.COM >wrote in message
QuoteWell, when I don't add the vclx.lib OR have it on the runtime library list When you add a TSomething to a form using the form designer, it inserts lines like '#pragma link "Something" in the .cpp file, which tell the linker where to find the class. OTOH, if you create components at runtime without using the VCL designer... "TSomething *fred = new TSomething(Owner)" ... then you probably want to add the #pragma link lines manually. Drop a TSomething on the form, then delete it. The 'pragma link' lines should be inserted (but not removed) in the CPP file. Quote>Maybe the TPopupMenu AV is a real bug in your code...? trying to pull in DLLs in error. QuoteBy the way Roddy, do you know if I dynamically link to rtl60.bpl and borlndmm.dll to handle memory management. If you have a statically linked memory manager in your app already, the DLL won't know about that or be able to use it, and will pull in the borlndmm.dll. end result: You have two memory managers running - a recipe for extreme chaos. HTH - Roddy |
Sally
![]() CBuilder Developer |
2006-05-13 06:30:09 PM
Re:When does deploying need cp3245mt.dll and borlndmm.dll?
I think either you are wrong or I'm making a mistake on a particular
point. I used the wonderful program you suggested (Dependency Walker) on a version where the RTL/VCL are loaded dynamically , VCLX/VCLJPG is builtin to the EXE, and when I profiled the program using DWalker it loaded the rtl.bpl and vcl60.bpl but there was no loading of borlndmm or any c*32*.dll. So what memory manager was the RTL.bpl and VCL60.bpl using in that case? Does RTL.bpl have its own memory manager now (meaning it IS the memory manager), or was it using my application's? =============== On a seperate note, after tons of digging I found out that the order of loading and initializing units/globals/etc CHANGES if you change to using dynamic RTL/VCL or not. So maybe something is getting initialized in the wrong order... but I can't see my own code changing in linking order since all my code is ALWAYS statically linked, so perhaps the RTL/VCL has a bug with regards to the order things are getting initialized? I do thank you greatly for the help so far in sorting out this mess... at least I am 2 steps closer to figuring out what on Earth is going on... I just hope it doesn't turn out to be a RTL/VCL bug or something. |
Sally
![]() CBuilder Developer |
2006-05-13 11:12:02 PM
Re:When does deploying need cp3245mt.dll and borlndmm.dll?
I have a single hint, on a different program I was compiling, a call to
"localtime()" will give a "Resource from different RTL" for the internal structure that localtime apparently uses. Error 00064. 0x340010 (Thread 0x0F60): Resource from different RTL: __internal_free ___org_free __cleanup __exit The memory block (0x00F624B0) [size: 88 bytes] was allocated with malloc __org_localtime localtime And this is with runtime RTL's all off, and ResourceWalker showing that no BPLs are being loaded other than borlndmm by CodeGuard... can anyone confirm this occurs for them as well? I have full debuggin/CodeGuard turned on at the time and runtime packages all totally off. |
Michel Leunen
![]() CBuilder Developer |
2006-05-14 01:31:27 AM
Re:When does deploying need cp3245mt.dll and borlndmm.dll?
Sally wrote:
QuoteI have a single hint, on a different program I was compiling, a call to system. From a previous post: QuoteWhen I turn off "runtime" packages, and add the vcl, vclx, and vcljpg packages'. That's all! You don't have to add anything to your project manually, except third party libraries. The IDE does it for you. Roddy already told you this. If I were you, I'd re-install BCB. I think you've played with too many options or settings, Packages or libraries list, and BCB is unusable now. Michel -- ---------------------------------------- Michel Leunen mailto: see my homepage. C++Builder, BCC5.5.1 Web site: www.leunen.com/ ---------------------------------------- |