link error LNK2001 - unresolved external symbol 
Author Message
 link error LNK2001 - unresolved external symbol

I am trying to build a trival C++ program called trace.
When I build trace in MS VS 6.0 I get linking error LMK2001, two clues
are:

1) Link error occures only when this #include directive is in trace.h :
#include "D:\My
Documents\vtk31\wolfmri\volumeCubic\vtkVolumePropertyCubic.h"

2) From Project settings>Debug tab>Executable for debug session>browse,
there is no trace.exe to be found.

3) I checked every potential problem listed in the help "Linker Tools
Error LNK2001 unresolved external symbol 'symbol'",
and everything looked OK.

--------------------Configuration: trace - Win32
Debug--------------------
Linking...
   Creating library Debug/trace.lib and object Debug/trace.exp
MainFrm.obj : error LNK2001: unresolved external symbol "public: virtual
void __thiscall vtkVolumePropertyCubic::PrintSelf(class ostream &,class
vtkIndent)"

trace.obj : error LNK2001: unresolved external symbol "public: virtual
void __thiscall vtkVolumePropertyCubic::PrintSelf(class ostream &,class
vtkIndent)"

traceDoc.obj : error LNK2001: unresolved external symbol "public:
virtual void __thiscall vtkVolumePropertyCubic::PrintSelf(class ostream
&,class vtkIndent)"

traceView.obj : error LNK2001: unresolved external symbol "public:
virtual void __thiscall vtkVolumePropertyCubic::PrintSelf(class ostream
&,class vtkIndent)"

MainFrm.obj : error LNK2001: unresolved external symbol "public: virtual
unsigned long __thiscall vtkVolumePropertyCubic::GetMTime(void)"

trace.obj : error LNK2001: unresolved external symbol "public: virtual
unsigned long __thiscall vtkVolumePropertyCubic::GetMTime(void)"

traceDoc.obj : error LNK2001: unresolved external symbol "public:
virtual unsigned long __thiscall vtkVolumePropertyCubic::GetMTime(void)"

traceView.obj : error LNK2001: unresolved external symbol "public:
virtual unsigned long __thiscall vtkVolumePropertyCubic::GetMTime(void)"

MainFrm.obj : error LNK2001: unresolved external symbol "protected:
virtual __thiscall
vtkVolumePropertyCubic::~vtkVolumePropertyCubic(void)"

trace.obj : error LNK2001: unresolved external symbol "protected:
virtual __thiscall
vtkVolumePropertyCubic::~vtkVolumePropertyCubic(void)"

traceDoc.obj : error LNK2001: unresolved external symbol "protected:
virtual __thiscall
vtkVolumePropertyCubic::~vtkVolumePropertyCubic(void)"

traceView.obj : error LNK2001: unresolved external symbol "protected:
virtual __thiscall
vtkVolumePropertyCubic::~vtkVolumePropertyCubic(void)"

Debug/trace.exe : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.

trace.exe - 13 error(s), 0 warning(s)

Thank you for reading the whole thing, Wolfv.



Sat, 08 Mar 2003 03:00:00 GMT  
 link error LNK2001 - unresolved external symbol

Quote:

>I am trying to build a trival C++ program called trace.
>When I build trace in MS VS 6.0 I get linking error LMK2001, two clues
>are:

>1) Link error occures only when this #include directive is in trace.h :
>#include "D:\My
>Documents\vtk31\wolfmri\volumeCubic\vtkVolumePropertyCubic.h"

Either add a .lib to the project import library list.  This will
contain the code/data that the .h file describes.

You #include'd the header in a file of the project, but you never
added the header of cpp of the module in question.  The app will
compile but won't link as it can't find the code.

The code doesn't exist in the first place (probably not, but you never
know).

Quote:
>Thank you for reading the whole thing, Wolfv.

You've missed a file somewhere, either a .lib or a .cpp.

Jim M



Sat, 08 Mar 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Linking Problem when trying to create ReleaseUMinDependency[error LNK2001: unresolved external symbol _main]

2. PxSQLScript.obj : error LNK2001: unresolved external symbol "class ATL::CTraceCa

3. error LNK2001: unresolved external symbol _ntohl@4

4. error LNK2001: unresolved external symbol _IID_ICategorizeProperties

5. error LNK2001: Unresolved external Symbol _IID__Class1

6. error LNK2001: unresolved external symbol

7. error LNK2001: unresolved external symbol _main

8. error LNK2001: unresolved external symbol

9. release build error LNK2001: unresolved external symbol _main

10. error LNK2001: unresolved external symbol _IID_IApplicationObject

11. Anyone knows error LNK2001: unresolved external symbol __imp__CoGetObjectContext@8

12. error LNK2001: unresolved external symbol _WinMain@16

 

 
Powered by phpBB® Forum Software