Board index » cppbuilder » When does deploying need cp3245mt.dll and borlndmm.dll?

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.
 
 

Re:When does deploying need cp3245mt.dll and borlndmm.dll?

Yes. Dynamic linked programs still require those DLL's.
. Ed
Quote
Sally wrote in message
news: XXXX@XXXXX.COM ...

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.
 

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}

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.
 

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.
 

Re:When does deploying need cp3245mt.dll and borlndmm.dll?

"Sally" < XXXX@XXXXX.COM >wrote in message
Quote
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.
Good choice. Dynamic linking is the devil's work.
Quote
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?
You shouldn't need to add these libraries to your project directly. Just
turn OFF 'runtime packages' and turn OFF 'use dynamic RTL' in linker
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

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
Hehe. I switched from BCB5 straight to BDS2006, so I can't *really* help
much...
- Roddy
 

Re:When does deploying need cp3245mt.dll and borlndmm.dll?

Quote
You shouldn't need to add these libraries to your project directly.
Just turn OFF 'runtime packages' and turn OFF 'use dynamic RTL' in
linker options.
Well, when I don't add the vclx.lib OR have it on the runtime library
list for dynamic linking, it gives me linking errors related to
components inside vclx. What do you think this could mean then?
Quote
Maybe the TPopupMenu AV is a real bug in your code...?
That is what I thought, but then I made my application basically do
nothing other than just open a new empty form and have a button that
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?
 

Re:When does deploying need cp3245mt.dll and borlndmm.dll?

"Sally" < XXXX@XXXXX.COM >wrote in message
Quote
Well, when I don't add the vclx.lib OR have it on the runtime library list
for dynamic linking, it gives me linking errors related to components
inside vclx. What do you think this could mean then?
Possibly that the '#pragma link <objfilename>' lines which the VCL designer
inserts have been removed in error.
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...?
That is what I thought, but then I made my application basically do
nothing other than just open a new empty form and have a button that 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.
Strange. Try looking at the DLL requirements of the exe that you get (MS
"Dependency Walker" - depends.exe) to see if your "static linked" one is
trying to pull in DLLs in error.
Quote
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?
I'm don't think you can mix and match like that. If you use a dynamically
linked rtl60.bpl, then it - in turn - can only use a dynamically linked
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
 

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.
 

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.
 

Re:When does deploying need cp3245mt.dll and borlndmm.dll?

Sally wrote:
Quote
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):
can anyone
confirm this occurs for them as well?
Nope. No error for me.
I read this whole thread and I think that actually you messed up your
system.
From a previous post:
Quote
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.
All you have to do to statically link all libraries in your executable
is uncheck 'Use Dynamic RTL' and uncheck in packages 'Build with runtime
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/
----------------------------------------