Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Package linking error

Status
Not open for further replies.

gpsr

Programmer
Aug 8, 2005
1
HU
Having some simple runtime packages working fine for years. Changed the location of the source directories, now I get linker errors.

- A.bpl defines and implements class CMyClass, compiles and links fine.
- B.bpl uses this class, compiles and links fine.
- C.exe uses both packages but wouldn't link:

[Linker Error] Unresolved external 'CMyClass::CMyClass()' referenced from B.lib|B.cpp
[Linker Error] Unresolved external 'CMyClass::~CMyClass()' referenced from B.lib|B.cpp
[Linker Error] Unresolved external 'CMyClass::Open(void *)' referenced from B.lib|B.cpp
[Linker Error] Unresolved external 'CMyClass::Set(const System::AnsiString&)' referenced from B.lib|B.cpp

Using tdump on A.obj and B.obj it turns out that C++ method names are mangled a bit different in the two files. (I'm using the same probject settings for all packages.)

Now if I try to compile B.cpp into A.bpl, I got linker errors again:

[Linker Error] Export CMyClass::CMyClass() in module A.OBJ references __fastcall System::AnsiString::AnsiString() in unit A.BPL
etc.

The previously compiling project hasn't been altered since (except from inserting B.cpp into it). It links to VCL et al.

Any help would be appreciated.

BCB6sp4.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top