Watch, Follow, &
Connect with Us

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


Welcome, Guest
Guest Settings
Help

Thread: Unresolved external


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


Permlink Replies: 4 - Last Post: Nov 1, 2017 3:16 AM Last Post By: Vaughan Mitchell
Vaughan Mitchell

Posts: 3
Registered: 10/24/16
Unresolved external  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 31, 2017 9:55 AM
[ilink32 Error] Error: Unresolved external 'my_class::~my_class()' referenced from \\VBOXSVR\BERLIN2\WIN32\DEBUG\O3_BID_02.OBJ

[ilink32 Error] Error: Unresolved external 'my_class::my_class(my_class&)' referenced from \\VBOXSVR\BERLIN2\WIN32\DEBUG\SLAM_1.OBJ

[ilink32 Error] Error: Unresolved external 'my_class::my_class()' referenced from \\VBOXSVR\BERLIN2\WIN32\DEBUG\SLAM_2.OBJ

C++ Builder 10.2 (Berlin).
Windows 8
This collection of files has been slightly edited just to compile with this compiler, but otherwise unchanged - and linked OK with C++ Builder 6, running under Win10.

Doubtless there's something elementary of which I am ignorant, so any guidance would be most welcome.
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Unresolved external  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 31, 2017 12:56 PM   in response to: Vaughan Mitchell in response to: Vaughan Mitchell
Vaughan Mitchell wrote:

[ilink32 Error] Error: Unresolved external 'my_class::~my_class()'
referenced from \\VBOXSVR\BERLIN2\WIN32\DEBUG\O3_BID_02.OBJ

[ilink32 Error] Error: Unresolved external
'my_class::my_class(my_class&)' referenced from
\\VBOXSVR\BERLIN2\WIN32\DEBUG\SLAM_1.OBJ

[ilink32 Error] Error: Unresolved external 'my_class::my_class()'
referenced from \\VBOXSVR\BERLIN2\WIN32\DEBUG\SLAM_2.OBJ

Did you add the source file that implements my_class to your project?
Does it define the body implementations of those 3 methods?

--
Remy Lebeau (TeamB)
Vaughan Mitchell

Posts: 3
Registered: 10/24/16
Re: Unresolved external  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 1, 2017 3:16 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Remy Lebeau (TeamB) wrote:
Vaughan Mitchell wrote:

[ilink32 Error] Error: Unresolved external 'my_class::~my_class()'
referenced from \\VBOXSVR\BERLIN2\WIN32\DEBUG\O3_BID_02.OBJ

[ilink32 Error] Error: Unresolved external
'my_class::my_class(my_class&)' referenced from
\\VBOXSVR\BERLIN2\WIN32\DEBUG\SLAM_1.OBJ

[ilink32 Error] Error: Unresolved external 'my_class::my_class()'
referenced from \\VBOXSVR\BERLIN2\WIN32\DEBUG\SLAM_2.OBJ

Did you add the source file that implements my_class to your project?
Does it define the body implementations of those 3 methods?

--
Remy Lebeau (TeamB)

There are 40+ .cpp files in this project.
There are 200+ functions in the class, listed in the header file.
The .cpp files all have the header file include statement. And they all compile OK.
Those functions are written in the various .cpp files.

I'm struggling with the phrase 'body implementation'. Would you please spell that out for me?

I notice that of all the OBJ files created, only 3 get a mention in the error list, and the errors are each slightly different. I haven't found anything to distinguish these 3 files from the rest.
Martin van der ...

Posts: 57
Registered: 7/14/02
Re: Unresolved external  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 1, 2017 1:29 AM   in response to: Vaughan Mitchell in response to: Vaughan Mitchell
Is this with the clang or the classic compiler?

I found that clang sometimes has trouble with code that's in the header files. If that's the case, try moving the code to the .cpp files (that's where it belongs, anyway).
Vaughan Mitchell

Posts: 3
Registered: 10/24/16
Re: Unresolved external  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 1, 2017 2:54 AM   in response to: Martin van der ... in response to: Martin van der ...
Martin van der Plas wrote:
Is this with the clang or the classic compiler?

I found that clang sometimes has trouble with code that's in the header files. If that's the case, try moving the code to the .cpp files (that's where it belongs, anyway).

I'm using the Classic compiler.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02