Link32 Error

Hi, after change of computer, re-installation of RAD Studio 2007, I started working on an existing C++ window form application project (> 1.5 milj lines of code) that's been in use for several years now. I started updating the code according to new user demands, testing it etc. and it all seem to work fine. Suddenly when I'm re-building the project there's linking error that hasn't not been there before. I've going through all paths etc. in "Project Options" and everything seem to be as expected but still the linking issue remains unsolved.
I've spent several days in trying to solve this and now I start to get desperate so please anyone!

[ILINK32 Error] Error: Unresolved external '__fastcall TCCEditOverheads::FormCreate(System::TObject *)' referenced from C:\DOCUMENTS AND SETTINGS\W70FA-ZCONMA00P\MY DOCUMENTS\RAD STUDIO\PROJECTS\COMBCALC2005\TMP\EDITOVERHEADS.OBJ

Who is Participating?
you should take that error message as it is. the linker misses an implementation of TCCEditOverheads::FormCreate(System::TObject *)'

what i wonder is that the object file where the request for the symbol comes from

what seems to be a temporary folder. youu should check whether the editoverhead.obj is valid and has current timestamp.

you should check that and look in the source for EDITOVERHEADS whether there is a call FormCreate and whether the arguments match to the implementation. i


I think there can be problem with same source files in different directories.
Where is TCCEditOverheads defined ? Try to find duplicate files for that class.

Also look for duplicete sourcefiles for editoverheads.obj file

peer754Author Commented:
Hi, I'm not sure I understand what you mean with "same source files in different directories"
There are backup source files on a different path not visible for the project file (.bcb).
I removed all .obj files I could find (there were duplicates within the Release, Debug and tmp directories) and rebuild the project but with the same error.
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

peer754Author Commented:
I just named that folder tmp.

As you can see in attached header file there is a reference to FormCreate() method. However, no other form in my project has this reference in its header and I therefore removed it and voilá it linked.
There is no implementation of a FormCreate within the corresponding .cpp and I don't honestly know how it got there in the first place.

#ifndef EditOverheadsH
#define EditOverheadsH
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "sitem.h"
#include <ExtCtrls.hpp>
#include <ComCtrls.hpp>

using namespace Structure;
class TCCEditOverheads : public TForm
	__published:	// IDE-managed Components
	TLabel *lbTitleText;
	TLabel *Label13;
	TLabel *Label15;
	TLabel *Label17;
	TLabel *Label18;
	TLabel *lbIntCur;
	TLabel *lbIndex;
	TLabel *lbIntCurIndex;
	TLabel *lbContext;
	TLabel *lbParameterStatus;
	TButton *ConfirmBut;
	TButton *CloseBut;
	TButton *ToggleCtxtBut;
	TButton *UpdateProjBut;
	TButton *UnlockBut;
	TMemo *ebIntCurIndex;
	TMemo *ebWarrantyOH;
	TMemo *ebPenaltyOH;
	TMemo *ebRiskContOH;
	TMemo *ebInternalIntRate;
	TLabel *Label1;
	TLabel *Label2;
	TLabel *Label3;
	TShape *Shape1;
	TShape *Shape2;
	TLabel *Label4;
	TLabel *lbInternalIntRate;
	TMemo *ebInternalCurrency;
	TLabel *Label5;
	TLabel *lbSellExLocal;
	TMemo *ebSellExI4OH;
	TMemo *ebSellExLocalOH;
	TLabel *Label6;
	TMemo *ebProvisionExtOH;
	TLabel *Label7;
	TLabel *Label32;
	TLabel *Label40;
	TLabel *Label44;
	TLabel *Label48;
	TLabel *Label52;
	TLabel *Label60;
	TLabel *Label9;
	TMemo *ebFixSurchargeOH;
	TMemo *ebInsuranceOH;
	TMemo *ebBankGOH;
	TMemo *ebLocTaxOH;
	TMemo *ebDutyOH;
	TMemo *ebECAOH;
	TMemo *ebHedgingOH;
	TMemo *ebOtherSpecialOH;
	TLabel *Label8;
	TMemo *ebProvisionIntOH;
	TLabel *label20;
	TMemo *ebNegMarginOH;
	TLabel *label21;
	TMemo *ebEVAOH;
	TLabel *Label10;
	TLabel *Label11;
	TShape *Shape3;
	TLabel *Label12;
	TMemo *ebEBITOH;
	TLabel *Label14;
	TRichEdit *reNote;
	TLabel *Label16;
	TMemo *ebIPROH;
	TLabel *Label19;
	TMemo *ebRDOH;
	TLabel *Label22;
	TLabel *Label23;
	TMemo *ebSalesOH;
	TLabel *Label24;
	TLabel *Label25;
	TMemo *ebAdminOH;
	TMemo *ebSectDivChargeOH;
	TLabel *Label26;
	TLabel *Label27;
	TLabel *Label28;
	TLabel *Label29;
	TMemo *ebScrapOH;
	TLabel *Label30;
	TLabel *Label31;
	TLabel *Label34;
	TMemo *ebSellExOH;
	TLabel *Label35;
	TLabel *Label36;
	TShape *Shape4;
	void __fastcall FormActivate(TObject *Sender);
	void __fastcall FormUpdate(TObject *Sender);
	void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
	void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
	void __fastcall ConfirmButClick(TObject *Sender);
	void __fastcall CloseButClick(TObject *Sender);
	void __fastcall UnlockButClick(TObject *Sender);
	void __fastcall ebInternalIntRateExit(TObject *Sender);
	void __fastcall ebWarrantyOHExit(TObject *Sender);
	void __fastcall ebSellExLocalOHExit(TObject *Sender);
	void __fastcall ebSellExI4OHExit(TObject *Sender);
	void __fastcall ebPenaltyOHExit(TObject *Sender);
	void __fastcall ebRiskContOHExit(TObject *Sender);
	void __fastcall ebProvisionExtOHExit(TObject *Sender);
	void __fastcall ebFixSurchargeOHExit(TObject *Sender);
	void __fastcall ebInsuranceOHExit(TObject *Sender);
	void __fastcall ebBankGOHExit(TObject *Sender);
	void __fastcall ebLocTaxOHExit(TObject *Sender);
	void __fastcall ebDutyOHExit(TObject *Sender);
	void __fastcall ebECAOHExit(TObject *Sender);
	void __fastcall ebHedgingOHExit(TObject *Sender);
	void __fastcall ebOtherSpecialOHExit(TObject *Sender);
	void __fastcall ebProvisionIntOHExit(TObject *Sender);
	void __fastcall ebNegMarginOHExit(TObject *Sender);
	void __fastcall ebEVAOHExit(TObject *Sender);
	void __fastcall ebEBITOHExit(TObject *Sender);
	void __fastcall ebWarrantyOHEnter(TObject *Sender);
	void __fastcall ebSellExLocalOHEnter(TObject *Sender);
	void __fastcall ebSellExI4OHEnter(TObject *Sender);
	void __fastcall ebPenaltyOHEnter(TObject *Sender);
	void __fastcall ebRiskContOHEnter(TObject *Sender);
	void __fastcall ebProvisionExtOHEnter(TObject *Sender);
	void __fastcall ebFixSurchargeOHEnter(TObject *Sender);
	void __fastcall ebInsuranceOHEnter(TObject *Sender);
	void __fastcall ebBankGOHEnter(TObject *Sender);
	void __fastcall ebLocTaxOHEnter(TObject *Sender);
	void __fastcall ebDutyOHEnter(TObject *Sender);
	void __fastcall ebECAOHEnter(TObject *Sender);
	void __fastcall ebHedgingOHEnter(TObject *Sender);
	void __fastcall ebOtherSpecialOHEnter(TObject *Sender);
	void __fastcall ebProvisionIntOHEnter(TObject *Sender);
	void __fastcall ebNegMarginOHEnter(TObject *Sender);
	void __fastcall ebEVAOHEnter(TObject *Sender);
	void __fastcall ebEBITOHEnter(TObject *Sender);
	void __fastcall ebInternalIntRateEnter(TObject *Sender);
	void __fastcall ebIntCurIndexEnter(TObject *Sender);
	void __fastcall ToggleCtxtButClick(TObject *Sender);
	void __fastcall UpdateProjButClick(TObject *Sender);
	void __fastcall UpdateCostGroups(TObject *Sender);
	void __fastcall ebInternalCurrencyEnter(TObject *Sender);
	void __fastcall ebNoteExit(TObject *Sender);
	void __fastcall reNoteExit(TObject *Sender);
	void __fastcall ebIPROHEnter(TObject *Sender);
	void __fastcall ebIPROHExit(TObject *Sender);
	void __fastcall ebRDOHEnter(TObject *Sender);
	void __fastcall ebRDOHExit(TObject *Sender);
	void __fastcall ebSalesOHExit(TObject *Sender);
	void __fastcall ebSalesOHEnter(TObject *Sender);
	void __fastcall ebAdminOHEnter(TObject *Sender);
	void __fastcall ebAdminOHExit(TObject *Sender);
	void __fastcall ebSectDivChargeOHEnter(TObject *Sender);
	void __fastcall ebSectDivChargeOHExit(TObject *Sender);
	void __fastcall ebScrapOHExit(TObject *Sender);
	void __fastcall ebScrapOHEnter(TObject *Sender);
	void __fastcall FormCreate(TObject *Sender);
	void __fastcall ebSellExOHEnter(TObject *Sender);
	void __fastcall ebSellExOHExit(TObject *Sender);

private:	// User declarations
	bool IsAuthorizedEdit;
	bool HasChanged;
	bool IsMaster;
	TStructItem *TempNode;
	TStructItem *ContextNode;
	bool EditMode;
	AnsiString timestring;
	AnsiString timemode;
	AnsiString note;

	double ProvisionExtOH;
	double FixSurchargeOH;
	double InsuranceOH;
	double BankGOH;
	double LocTaxOH;
	double DutyOH;
	double ECAOH;
	double HedgingOH;
	double OtherSpecialOH;
	double RiskContOH;
	double WarrantyOH;
	double PenaltyOH;
	double ProvisionIntOH;
	double sellExLocalOH;
	double sellExI4OH;
	double NegMarginOH;
	double EVAOH;
	double EBITOH;
	double internalintrate;
	double IPROH;
	double RDOH;
	double AdminOH;
	double SectDivChargeOH;
	double SalesOH;
	double SellExOH;
	double ScrapOH;
	void __fastcall updateSellingEx();

public:		// User declarations
	__fastcall TCCEditOverheads(TComponent* Owner, bool IsAuthorizedEdit_in);
extern PACKAGE TCCEditOverheads *CCEditOverheads;

Open in new window

peer754Author Commented:
Oooh, I forgot to say THANK YOU Sara!!! :D I promise to read the complete error message next time :-o

i am glad if my comment was helpful.

normally the linker shouldn't complain if there wasn't an implementation of a function never called.

but the statement

     extern PACKAGE TCCEditOverheads *CCEditOverheads;

means that there is a global pointer CCEditOverheads which probably was used to construct an instance of TCCEditOverheads  within the .cpp. if that is true, you may also find a call  to FormCreate in the source. if you never had problems in the past with that, you could check whether the call (or the whole function where it was in) was within a preprocessor conditioned block. then, i would assume the precondition had changed with your reinstallation.


Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.