🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.upgrade
4 messages
4 total messages Started by Simon Guertin Tue, 19 Jun 2007 15:17
Upgrade from 2006 to 2007 Linker String error
#321
Author: Simon Guertin
Date: Tue, 19 Jun 2007 15:17
29 lines
1916 bytes
Hi, I am trying out the new Borland 2007 C++ Builder and I am having 
trouble compiling and linking my project that works fine in 2006.

I opened the Borland 2006 c++ Project in the 2007 and the upgrade was fine.
I did not changed any project options in the new project. I resolved 
some minor compilation problems and the compilation is now fine. But now 
it tells me an ILINK32 Error: Unresolved external __fastcall 
System::AnsiString::LoadString( void *, int ) referenced from 
c:\myproject\o\myobject.o

It seems the LoadString function does not exist anymore for AnsiString 
object? I am reading the help but I cant find the AnsiString object 
anymore too.

It also looks like it does not link in a new project start from the 
File/new VCL Forms application.

Here is the problematic code:

HMODULE hmod = ::LoadLibrary( "nmcdat.dll" );
if ( hmod ){
   String pc;
   pc.LoadString( hmod, 1000 );
}


Thank you for any help.

Simon
Re: Upgrade from 2006 to 2007 Linker String error
#322
Author: Craig Farrell
Date: Wed, 20 Jun 2007 18:51
16 lines
1715 bytes
Hi,

> it tells me an ILINK32 Error: Unresolved external __fastcall 
> System::AnsiString::LoadString( void *, int ) referenced from 
> c:\myproject\o\myobject.o

It seems there is a name-mangling problem in some of the
methods that take Windows handle params in vcle.lib. vcle.lib
is the "emulation" library, the bridge from C++ to Delphi,
for things like the AnsiString class. A workaround would be to,
in the module that uses the methods, tell the linker to look
for the actual mangled name, e.g.
#pragma alias 
"@System@AnsiString@LoadStringA$qqrpvi"="@System@AnsiString@LoadStringA$qqrp11HINSTANCE__i"

--Craig
Re: Upgrade from 2006 to 2007 Linker String error
#324
Author: Simon Guertin
Date: Wed, 20 Jun 2007 20:47
28 lines
1855 bytes
Craig Farrell wrote:
> Hi,
> 
>> it tells me an ILINK32 Error: Unresolved external __fastcall 
>> System::AnsiString::LoadString( void *, int ) referenced from 
>> c:\myproject\o\myobject.o
> 
> 
> It seems there is a name-mangling problem in some of the
> methods that take Windows handle params in vcle.lib. vcle.lib
> is the "emulation" library, the bridge from C++ to Delphi,
> for things like the AnsiString class. A workaround would be to,
> in the module that uses the methods, tell the linker to look
> for the actual mangled name, e.g.
> #pragma alias 
> "@System@AnsiString@LoadStringA$qqrpvi"="@System@AnsiString@LoadStringA$qqrp11HINSTANCE__i" 
> 
> 
> --Craig
> 
Amazing it worked, thanks

But is this normal I have to patch it this way or this will be fixed 
through a fix later on?

Thanks again.

Simon
Re: Upgrade from 2006 to 2007 Linker String error
#326
Author: Craig Farrell
Date: Wed, 20 Jun 2007 21:46
13 lines
1525 bytes
Hi again,

> But is this normal I have to patch it this way or this will be fixed 
> through a fix later on?

IMO, it is serious and should be fixed in a patch. It
is not normal but, unfortunately, somewhat common that
problems show up relating to name mangling when methods
have parameters such as HMODULE, HDC, etc. (the reason
the problem manifests there is the difference in those
Windows handle types when STRICT is defined).

--Craig
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads