[vtkusers] Linker error unresolved external in C++ Builder 6.0

David Cole david.cole at kitware.com
Tue Nov 13 06:46:30 EST 2007


Are you using CMake to generate your Borland makefile?
Are you using a build of VTK also built with CMake / Borland makefiles?

That is the normal/expected VTK use.

If you have built VTK and want to use it *without* using CMake to drive the
build of your project, then you have to add stuff to the Borland project to
enable including VTK header files and linking to VTK libraries.

As I am not a Borland GUI user, I do not know how to tell you to add a VTK
library through Borland's GUI. Unresolved external errors mean that some
library is missing from the link line -- if you are using a CMake based
project, this should just work; if you are using Borland's IDE/GUI then you
are on your own... :-)

Any other Borland IDE users out there that can help Walter?

HTH,
David


On 11/13/07, Walter Cabrera <walter at eresmas.net> wrote:
>
>
> Dear Kent and David:
>
>
> This is the source:
>
> #include <vcl.h>
> #pragma hdrstop
>
> #include "Unit1.h"
> #include <vtkBMPReader.h>
>
> //---------------------------------------------------------------------------
> #pragma package(smart_init)
> #pragma resource "*.dfm"
> TForm1 *Form1;
>
> //---------------------------------------------------------------------------
> __fastcall TForm1::TForm1(TComponent* Owner)
>   : TForm(Owner)
> {
>   vtkBMPReader *bmpReader=vtkBMPReader::New();
> }
>
> and this is the error
>
> [Linker Error] Unresolved external 'vtkBMPReader::New()' referenced from
> C:\VTK\UNIT1.OBJ
>
> I think that the error is in link step.
>
> Thanks
>
>
>
> Kent Eschenberg wrote:
> >
> > Nevertheless David is correct: there is no such class as VTKBMPReader.
> Why
> > not
> > correct this error and see what happens?
> >
> > Kent
> >
> > Walter Cabrera wrote:
> >> Hi dear David:
> >>
> >> This it is not the mistake because the compilation step executes
> >> successfully, vtkBMPReader is written correctly in the source, the
> error
> >> is
> >> in the step of link.
> >>
> >> Thanks
> >>
> >>
> >> David Cole wrote:
> >>> There is no VTKBMPReader with upper case VTK... If that's printed,
> it's
> >>> a
> >>> typo.
> >>>
> >>> Try "vtkBMPReader"
> >>>
> >>> HTH,
> >>> David
> >>>
> >>> On 11/6/07, Walter Cabrera <walter at eresmas.net> wrote:
> >>>>
> >>>> Hi.
> >>>> My environment is the compiler C++ Builder 6.0.  I am trying to
> execute
> >>>> the
> >>>> example of the VTK User's Guide (page 54). Using the VTKBMPReader
> class
> >>>> in
> >>>> the instruction
> >>>>
> >>>> VTKBMPReader* bmpreader=VTKBMPReader::New(); I get the error
> >>>>
> >>>>             Linker error unresolved external "VTKBMPReader::New()"
> >>>> referenced from unit3.obj
> >>>>
> >>>>             I suppose that this error is related with the cmake
> >>>> configuration I use. Can someone help me and give a hint?
> >>>>
> >>>>             Thanks
> >>>>
> >>>> --
> >>>> View this message in context:
> >>>>
> http://www.nabble.com/Linker-error-unresolved-external-in-C%2B%2B-Builder-6.0-tf4757672.html#a13605341
> >>>> Sent from the VTK - Users mailing list archive at Nabble.com.
> > _______________________________________________
> > This is the private VTK discussion list.
> > Please keep messages on-topic. Check the FAQ at:
> > http://www.vtk.org/Wiki/VTK_FAQ
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Linker-error-unresolved-external-in-C%2B%2B-Builder-6.0-tf4757672.html#a13721502
> Sent from the VTK - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20071113/6758437c/attachment.htm>


More information about the vtkusers mailing list