Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: RAD Studio 10 Seattlle C++ RTL Linker problem


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 27 - Last Post: Oct 1, 2015 2:02 AM Last Post By: Leif Nielsen
Leif Nielsen

Posts: 10
Registered: 11/30/07
RAD Studio 10 Seattlle C++ RTL Linker problem  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 2, 2015 4:19 AM
Hi,

In RAD10 I cannot generate a VCL C++ based native 32 bit Windows EXE file that does NOT require the BORLNDMM.DLL!

1. Installed RAD Studio 10 Seattle on a 64 bit Windows 7 host.
2. Created a C++ VCL app (Hello World) - one button, one memo, one action.
3. Removed the Link with Dynamic RTL Library for all platforms.
4. Compiled the project as 32 bit (on my Windows 7 64 bit machine)
5. Run the EXE file on my development machine - SUCCESS!
6. Tried to run the EXE file on another test machine with-out RAD Studio and the EXE file asked for BORLNDMM.DLL. and could not run - FAIL!
7. Changed Target Platform to 64 bit - an re-build the project.
8. Now the EXE file runs on both the development machine as well as on the test machine.

This behavior is NOT present in XE7 on the same machine!!
It looks like the required code is not embedded into the executable when compiling for 32 bit target, could be a missing PATH to the correct 32 bit file...

Is this a 32bit C++ linker problem or just a BUG?

Best regards
Leif Nielsen
Konstantin Poly...

Posts: 5
Registered: 4/16/06
Re: RAD Studio 10 Seattlle C++ RTL Linker problem  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 2, 2015 4:51 AM   in response to: Leif Nielsen in response to: Leif Nielsen
Hello,

This IDE bug will gone if you change the complier for 32-bit target from old Borland to Clang. Go to Project - Options... -> C++ Compiler and unmark "Use "classic" Borland compiler".
Leif Nielsen

Posts: 10
Registered: 11/30/07
Re: RAD Studio 10 Seattlle C++ RTL Linker problem  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 2, 2015 5:21 AM   in response to: Konstantin Poly... in response to: Konstantin Poly...
Hi, thanks for Your answer.

Removing the "classic" tick works OK on the development machine - however on the test machine - this fix just causes the EXE file to request for another DLL "CC32C230MT.DLL" instead.

A/ Do You know for at fact that this is a known BUG in "Seattle" when compiling to 32 bit targets in C++?
B/ Unless a fix for this can be found using the classic compiler mode - then this release cannot be used in our organization! It should be able to perform with a simple VCL Form with one button and one Memo - agree?

Best regards
Leif Nielsen
Konstantin Poly...

Posts: 5
Registered: 4/16/06
Re: RAD Studio 10 Seattlle C++ RTL Linker problem  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 2, 2015 6:11 AM   in response to: Leif Nielsen in response to: Leif Nielsen
To avoid the problem with "CC32C230MT.DLL" you need, I think, to disable "Link with dynamic RTL" and/or "Link with runtime packages".

A/ Do You know for at fact that this is a known BUG in "Seattle" when compiling to 32 bit targets in C++?

Regarding the first problem from your message: I think, this is definitely a bug with the "classic" compiler. I believe, the IDE should be able to create the default empty project which can be ran on the development machine.

Edited by: Konstantin Polyakov on Sep 2, 2015 6:12 AM
Leif Nielsen

Posts: 10
Registered: 11/30/07
Re: RAD Studio 10 Seattlle C++ RTL Linker problem  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 2, 2015 7:22 AM   in response to: Konstantin Poly... in response to: Konstantin Poly...
Konstantin Polyakov wrote:
To avoid the problem with "CC32C230MT.DLL" you need, I think, to disable "Link with dynamic RTL" and/or "Link with runtime packages".

A/ Do You know for at fact that this is a known BUG in "Seattle" when compiling to 32 bit targets in C++?

Regarding the first problem from your message: I think, this is definitely a bug with the "classic" compiler. I believe, the IDE should be able to create the default empty project which can be ran on the development machine.

Edited by: Konstantin Polyakov on Sep 2, 2015 6:12 AM

Hi, thanks again for your input, but unfortunately it has no influence, because these settings are already in place.

BTW: Running the 32 bit EXE file on a 64bit target machine with an older (XE7) BORLNDMM.DLL reveals that the EXE files needs access to the following DLL function__dbk_fcall_wrapper ( this indicates something about debug BUT the compiled EXE file is compiled completely with-out DEBUG info. I guess we have a Major flaw here. Any one knows anything else about this and if you are not planning to distribute you software with run-time modules you should stay with XE7 / XE8 until a fix has been found.

Best regards
Leif Nielsen
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: RAD Studio 10 Seattlle C++ RTL Linker problem [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 2, 2015 12:05 PM   in response to: Konstantin Poly... in response to: Konstantin Poly...
Konstantin wrote:

To avoid the problem with "CC32C230MT.DLL" you need, I think, to
disable "Link with dynamic RTL" and/or "Link with runtime packages".

There is a third option that also needs to be disable when linking a standalone
executable: "Link with Delphi Runtime Library".

--
Remy Lebeau (TeamB)
Palle Meinert

Posts: 14
Registered: 10/3/12
Re: RAD Studio 10 Seattlle C++ RTL Linker problem  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 2, 2015 7:46 AM   in response to: Leif Nielsen in response to: Leif Nielsen
3. Removed the Link with Dynamic RTL Library for all platforms.
Did you remember to uncheck "link with runtime packages" too?

Creating a stand alone exe has always required both of these options to be disabled.
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: RAD Studio 10 Seattlle C++ RTL Linker problem  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 2, 2015 12:06 PM   in response to: Palle Meinert in response to: Palle Meinert
Palle wrote:

Did you remember to uncheck "link with runtime packages" too?

Creating a stand alone exe has always required both of these options
to be disabled.

And also a third option in recent versions: "Link with Delphi Runtime Library".

--
Remy Lebeau (TeamB)
Goran Ekstrom

Posts: 149
Registered: 1/10/04
Re: RAD Studio 10 Seattlle C++ RTL Linker problem  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 2, 2015 9:23 AM   in response to: Leif Nielsen in response to: Leif Nielsen
Leif Nielsen wrote:
Hi,

In RAD10 I cannot generate a VCL C++ based native 32 bit Windows EXE file that does NOT require the BORLNDMM.DLL!

Confirmed here as well, major issue.
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: RAD Studio 10 Seattlle C++ RTL Linker problem  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 2, 2015 12:04 PM   in response to: Leif Nielsen in response to: Leif Nielsen
Leif wrote:

3. Removed the Link with Dynamic RTL Library for all platforms.

Did you also disable the "Link with Delphi Runtime Library" option?

--
Remy Lebeau (TeamB)
Leif Nielsen

Posts: 10
Registered: 11/30/07
Re: RAD Studio 10 Seattlle C++ RTL Linker problem  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 2, 2015 2:53 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Remy Lebeau (TeamB) wrote:
Leif wrote:

3. Removed the Link with Dynamic RTL Library for all platforms.

Did you also disable the "Link with Delphi Runtime Library" option?

--
Remy Lebeau (TeamB)

Yep:
C++ Linker: "Link with Dynamic RTL" = false
Packages/Runtime Packages: "Link with runtime packages" = false
32 bit EXE equires BORLNDMM.DLL on non-development machines (will not run with-out it)
64 bit EXE works as expected on non-development machines.

And like Goran Ekstrom I made a 2nd test installation of RAD Studio 10 on another 64 bit Windows 7 PC - same deal :-(
Wonder how this slipped through final testing - maybe no one tested 32 bit exes on end-user PCs where no RAD Studio DLLs are installed.

Anyone from Embarcadero that wants to comment on this - because this bug more or less renders the product unusable for us. We have a lot of small production tool apps (small stand-alone 32bit exe files) simple to install, simple to maintain an update for NON-PC Geeks.
Hoping for "The Cure" :-)

Leif Nielsen
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: RAD Studio 10 Seattlle C++ RTL Linker problem  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 2, 2015 3:14 PM   in response to: Leif Nielsen in response to: Leif Nielsen
Leif wrote:

Yep:
C++ Linker: "Link with Dynamic RTL" = false
Packages/Runtime Packages: "Link with runtime packages" = false

Read what I said again more carefully. There is a third option that has
to be disabled as well:

C++ Linker: "Link with Delphi Runtime Library (rtl package and cp32mt.lib/cp32mti.lib)"
= false

--
Remy Lebeau (TeamB)
Leif Nielsen

Posts: 10
Registered: 11/30/07
Re: RAD Studio 10 Seattlle C++ RTL Linker problem  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 3, 2015 12:04 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Read what I said again more carefully. There is a third option that has
to be disabled as well:

C++ Linker: "Link with Delphi Runtime Library (rtl package and cp32mt.lib/cp32mti.lib)"
= false

--
Remy Lebeau (TeamB)

Confirm that linking with Delphi Runtime has never been ticked in any of my tests.
C++ Linker: "Link with Delphi Runtime Library (rtl package and cp32mt.lib/cp32mti.lib)" = false (CONFIRMED)

Remy: Did You install the new "RAD Studio 10 Seattle", and if so are YOU able to compile a simple 32 bit C++ Windows VCL ("Hello World") app to a single stand-alone EXE file that will run on a PC without the RAD Studio and without the Embarcadero Memory Manager BORLNDMM.DLL in the search path?

Best regards
Leif Nielsen
Palle Meinert

Posts: 14
Registered: 10/3/12
Re: RAD Studio 10 Seattlle C++ RTL Linker problem  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 3, 2015 3:26 AM   in response to: Leif Nielsen in response to: Leif Nielsen
Remy: Did You install the new "RAD Studio 10 Seattle", and if so are YOU able to compile a simple 32 bit C++ Windows VCL ("Hello World") app to a single stand-alone EXE file that will run on a PC without the RAD Studio and without the Embarcadero Memory Manager BORLNDMM.DLL in the search path?

Best regards
Leif Nielsen
I don't have another Windows machine to test on, but I tried checking with dependency Walker. I tried both with C:\Users\Public\Documents\Embarcadero\Studio\17.0\Samples\CPP\RTL\SortVector (which contains C++11 code) and a fresh empty VCL app set to use the bcc32c (clang 32bit). In both cases I could eliminate BORLNDMM from the dependency by unchecking following in Project Options (Targets == All configurations and All Platforms):
C++ Linker->Link with Dynamic RTL = false
C++ Linker->Link with the Delphi Runtime library = false (was already this by default)
Packages->Runtime Packages->Link with runtime packages = false
Goran Ekstrom

Posts: 149
Registered: 1/10/04
Re: RAD Studio 10 Seattlle C++ RTL Linker problem  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 3, 2015 5:06 AM   in response to: Palle Meinert in response to: Palle Meinert
Palle Meinert wrote:
Remy: Did You install the new "RAD Studio 10 Seattle", and if so are YOU able to compile a simple 32 bit C++ Windows VCL ("Hello World") app to a single stand-alone EXE file that will run on a PC without the RAD Studio and without the Embarcadero Memory Manager BORLNDMM.DLL in the search path?

Best regards
Leif Nielsen
I don't have another Windows machine to test on, but I tried checking with dependency Walker. I tried both with C:\Users\Public\Documents\Embarcadero\Studio\17.0\Samples\CPP\RTL\SortVector (which contains C++11 code) and a fresh empty VCL app set to use the bcc32c (clang 32bit). In both cases I could eliminate BORLNDMM from the dependency by unchecking following in Project Options (Targets == All configurations and All Platforms):
C++ Linker->Link with Dynamic RTL = false
C++ Linker->Link with the Delphi Runtime library = false (was already this by default)
Packages->Runtime Packages->Link with runtime packages = false

Do you mean that you do not get the BORLNDMM error now? I tried everything above, still same error.
Stephen Fewer

Posts: 6
Registered: 9/12/02
Re: RAD Studio 10 Seattlle C++ RTL Linker problem  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 3, 2015 5:17 AM   in response to: Goran Ekstrom in response to: Goran Ekstrom
The issue seems to manifest only when using the classic bcc32 compiler and not the new clang bcc32c compiler.
Goran Ekstrom

Posts: 149
Registered: 1/10/04
Re: RAD Studio 10 Seattlle C++ RTL Linker problem  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 3, 2015 5:32 AM   in response to: Stephen Fewer in response to: Stephen Fewer
Stephen Fewer wrote:
The issue seems to manifest only when using the classic bcc32 compiler and not the new clang bcc32c compiler.

Yes, C-lang 32 and 64 works, Classic 32 does not.
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: RAD Studio 10 Seattlle C++ RTL Linker problem  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 3, 2015 12:24 PM   in response to: Leif Nielsen in response to: Leif Nielsen
Leif wrote:

Remy: Did You install the new "RAD Studio 10 Seattle"

Not yet.

--
Remy Lebeau (TeamB)
Stephen Fewer

Posts: 6
Registered: 9/12/02
Re: RAD Studio 10 Seattlle C++ RTL Linker problem  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 3, 2015 5:12 AM   in response to: Leif Nielsen in response to: Leif Nielsen
I have tested and confirmed this issue too.

I opened a case here: https://quality.embarcadero.com/browse/RSP-11768

Please comment/upvote the JIRA case above if it effects you also.

Edited by: Stephen Fewer on Sep 3, 2015 9:07 AM
Martin van der ...

Posts: 57
Registered: 7/14/02
Re: RAD Studio 10 Seattlle C++ RTL Linker problem  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 3, 2015 7:19 AM   in response to: Leif Nielsen in response to: Leif Nielsen
I can confirm this as well.

Using classic compiler.

- Link with Dynamic RTL = False
- Link with Delphi Runtime Library = False
- Link with Runtime Packages = False

But the resulting .exe still requires BORLNDMM.DLL
Hanno Nagland

Posts: 7
Registered: 7/7/01
Re: RAD Studio 10 Seattlle C++ RTL Linker problem  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 3, 2015 9:01 AM   in response to: Leif Nielsen in response to: Leif Nielsen
Hi

I can confirm this too.

Temporary workaround (probably not correct, but seems to help): describe BORLNDMM.DLL as delay loaded, see "Delay load .DLLs" in project options.

Hanno

Edited by: Hanno Nagland on Sep 3, 2015 9:05 AM
Craig Bultitude

Posts: 1
Registered: 3/28/02
Re: RAD Studio 10 Seattlle C++ RTL Linker problem  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 4, 2015 3:04 AM   in response to: Hanno Nagland in response to: Hanno Nagland
Hanno Nagland wrote:

Temporary workaround (probably not correct, but seems to help): describe BORLNDMM.DLL as delay loaded, see "Delay load .DLLs" in project options.

That workaround works great.
Thanks Hanno.

For the benefit of others, go to
Project -> Options -> C++ Linker -> Advanced -> Delay load DLLs
and set it to BORLNDMM.DLL
Goran Ekstrom

Posts: 149
Registered: 1/10/04
Re: RAD Studio 10 Seattlle C++ RTL Linker problem  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 4, 2015 5:40 AM   in response to: Craig Bultitude in response to: Craig Bultitude
Craig Bultitude wrote:
Hanno Nagland wrote:

Temporary workaround (probably not correct, but seems to help): describe BORLNDMM.DLL as delay loaded, see "Delay load .DLLs" in project options.

That workaround works great.
Thanks Hanno.

For the benefit of others, go to
Project -> Options -> C++ Linker -> Advanced -> Delay load DLLs
and set it to BORLNDMM.DLL

Isn't BORLNDMM needed? Delaying it will only delay the error to a later stage in the app, or?!
Chester Cheng

Posts: 1
Registered: 1/28/00
Re: RAD Studio 10 Seattlle C++ RTL Linker problem  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 6, 2015 11:13 PM   in response to: Hanno Nagland in response to: Hanno Nagland
Hanno Nagland wrote:
Hi

I can confirm this too.

Temporary workaround (probably not correct, but seems to help): describe BORLNDMM.DLL as delay loaded, see "Delay load .DLLs" in project options.

Hanno

Edited by: Hanno Nagland on Sep 3, 2015 9:05 AM

Thanks,

Confirm this too. and Delay load. DLLs can solve this problem.

BUT, I unchecked 'use classic borland compiler'
Linker will response.

[ilink32 Warning] Warning: unknown heap name : 0x08000000 / 0x08000000
[ilink32 Warning] Warning: Error detected (ILI2008)
[ilink32 Error] Error: Unable to perform link

But x64 linker work.
Stephen Fewer

Posts: 6
Registered: 9/12/02
Re: RAD Studio 10 Seattlle C++ RTL Linker problem  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 7, 2015 1:42 AM   in response to: Chester Cheng in response to: Chester Cheng

[ilink32 Warning] Warning: unknown heap name : 0x08000000 / 0x08000000
[ilink32 Warning] Warning: Error detected (ILI2008)
[ilink32 Error] Error: Unable to perform link

I have come across the ILI2008 linker issue also. A case is open here https://quality.embarcadero.com/browse/RSP-11737 it would be useful if you upvote and comment on this case if it effects you also.
Leif Nielsen

Posts: 10
Registered: 11/30/07
Re: RAD Studio 10 Seattlle C++ RTL Linker problem  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 29, 2015 5:13 AM   in response to: Chester Cheng in response to: Chester Cheng
Roy Nelson provided us with a solution:
https://quality.embarcadero.com/browse/RSP-11768
I quote him on this:

Here is what you can do...
1) use impdef, as follows:
"impdef memmgr.def borlndmm.dll"
2) load the "memmgr.def" into a text editor.
3) comment these lines out by adding semi colons:

; __dbk_fcall_wrapper @2 ; __dbk_fcall_wrapper
; dbkFCallWrapperAddr @1 ; dbkFCallWrapperAddr

4) then use implib
"implib -c numemmgr.lib memmgr.def"
6) now rename your "memmgr.lib" to "oldmemmgr.lib"
7) "numemmgr.lib" to "memmgr.lib"
8) rebuild your application and the problem should have disappeared.

This works in my set-up - credit goes to Roy for this - THANKS!

Best regards
Leif Nielsen

Edited by: Leif Nielsen on Sep 29, 2015 5:13 AM

Edited by: Leif Nielsen on Sep 29, 2015 5:15 AM
Kaj Christensen

Posts: 2
Registered: 9/25/00
Re: RAD Studio 10 Seattlle C++ RTL Linker problem  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 1, 2015 1:49 AM   in response to: Chester Cheng in response to: Chester Cheng
Chester Cheng wrote:
Hanno Nagland wrote:
Hi

I can confirm this too.

Temporary workaround (probably not correct, but seems to help): describe BORLNDMM.DLL as delay loaded, see "Delay load .DLLs" in project options.

Hanno

Edited by: Hanno Nagland on Sep 3, 2015 9:05 AM

Thanks,

Confirm this too. and Delay load. DLLs can solve this problem.

BUT, I unchecked 'use classic borland compiler'
Linker will response.

[ilink32 Warning] Warning: unknown heap name : 0x08000000 / 0x08000000
[ilink32 Warning] Warning: Error detected (ILI2008)
[ilink32 Error] Error: Unable to perform link

But x64 linker work.

Didn't work for me. Still problems with Borlndmm.dll

The solution for me was to copy the correct Borlndmm.dll in the same folder as the exe-file.
Copied from: C:\Program Files (x86)\Embarcadero\Studio\17.0\Redist\win32

Now the app loads and seams to work correct :)
Leif Nielsen

Posts: 10
Registered: 11/30/07
Re: RAD Studio 10 Seattlle C++ RTL Linker problem  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 1, 2015 2:02 AM   in response to: Kaj Christensen in response to: Kaj Christensen
Kaj Christensen wrote:

Didn't work for me. Still problems with Borlndmm.dll

The solution for me was to copy the correct Borlndmm.dll in the same folder as the exe-file.
Copied from: C:\Program Files (x86)\Embarcadero\Studio\17.0\Redist\win32

Now the app loads and seams to work correct :)

Ok Kaj,

But the whole point of NOT USING RUNTIME DLLs is to eliminate the use of extra Borland/Embarcadero DLL's in your released project. !
If you do not want to use runtime DLLs and only want to distribute ONE SINGLE EXE FILE, then the only and best solution is to tweak the memmgr.lib as instructed in my above post.

Regards
Leif
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02