Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: Unresolved External Error


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


Permlink Replies: 4 - Last Post: Jun 20, 2017 11:19 AM Last Post By: Earl Staley Threads: [ Previous | Next ]
Earl Staley

Posts: 87
Registered: 4/9/07
Unresolved External Error  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 19, 2017 4:54 PM
I developed a TStripChart component for plotting data way back with C++ Builder 4 and installed the component as a package. The same component was recompiled with C++ Builder 2010, C++ Berlin 10.1, and C++ Tokyo 10.2. The component has been used on all the compilers, except C++ Tokyo 10.2 due to the error below.

The package installed OK and the component appears in the Tool Palette. I can place the component on a form and I can work with the component normally in the editor and Object Inspector. However, when I try to run the program, I get the following error:

Unresolved external 'TStripChartTokyo::' referenced from (...)\UNIT1.OBJ

I did not get the error with previous editions of C++, so why am I getting the error with C++ Tokyo 10.2?

Earl Staley
Remy Lebeau (Te...


Posts: 8,950
Registered: 12/23/01
Re: Unresolved External Error  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 19, 2017 7:57 PM   in response to: Earl Staley in response to: Earl Staley
Earl Staley wrote:

However, when I try to run the program, I get the following error:

Unresolved external 'TStripChartTokyo::' referenced from
(...)\UNIT1.OBJ

I did not get the error with previous editions of C++, so why am I
getting the error with C++ Tokyo 10.2?

Clearly your project is either not actually linking to the component's
package, or your package is missing the actual class the linker is
looking for. What are the EXACT steps you perform to setup the IDE and
project?

Why are you naming the component class after the IDE version?

--
Remy Lebeau (TeamB)
Earl Staley

Posts: 87
Registered: 4/9/07
Re: Unresolved External Error  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 19, 2017 9:49 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Thank you for your response.

Clearly your project is either not actually linking to the component's
package, or your package is missing the actual class the linker is
looking for. What are the EXACT steps you perform to setup the IDE and
project?
I select File>New>VCL Forms Application. I locate the TStripChartTokyo component in the Tool Palette and place it on the form. There are no other components, nor any code that I originated in the code and I get the error when the linker runs.

Here is the constructor for TStripChartTokyo:
__fastcall TStripChartTokyo::TStripChartTokyo(TComponent* Owner)
	: TCustomControl(Owner)
{
(...)
}

Why are you naming the component class after the IDE version?
I named the components after the version of C++ Professional to keep track of which component goes with which compiler.

Earl Staley
Remy Lebeau (Te...


Posts: 8,950
Registered: 12/23/01
Re: Unresolved External Error  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 20, 2017 11:16 AM   in response to: Earl Staley in response to: Earl Staley
Earl Staley wrote:

I select File>New>VCL Forms Application. I locate the
TStripChartTokyo component in the Tool Palette and place it on the
form.

When you do that, is the IDE adding appropriate "#prama link"
statements to your code?

I named the components after the version of C++ Professional to keep
track of which component goes with which compiler.

That is what package filenames are for. If you rename the class
itself, you have to change your project and code every time you port to
a new IDE version.

--
Remy Lebeau (TeamB)
Earl Staley

Posts: 87
Registered: 4/9/07
Re: Unresolved External Error  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 20, 2017 11:19 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
When you do that, is the IDE adding appropriate "#prama link"
statements to your code?

Yes, here is the statement copied from the code:

#pragma link "StripChartTokyo"

Thank you for your help...
Earl Staley
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02