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

Walter Cabrera walter at eresmas.net
Tue Nov 13 08:38:15 EST 2007


Dear David:

I am using CMake with the following configuration:

Source code: C:\VTK
build the binaries: C:\VTK\build

BUILD_EXAMPLES: OFF
BUILD_SHARED_LIBS:OFF
CMAKE_BACKWARDS_COMPATIBILITY: 2.4
CMAKE_BUILD_TYPE: Debug
CMAKE_INSTALL_PREFIX: C:/VTK
VTK_DATA_ROOT: C:/VTK/VTKData
VTK_USE_PARALLEL: ON
VTK_USE_RENDERING: ON
VTK_WRAP_JAVA: OFF
VTK_WRAP_PYTHON: OFF
VTK_WRAP_TCL: OFF

Then I used Borland make(makefile) 
 
I think as you that some library is missing from the link. 

In borland the path to library are placed using Project | Options |
Directories/Conditionals | Library path

Hear is the path C:\VTK\build\bin that contains the VTK libraries builded by
CMake

But the error continues ....

Thank you for everything, very nice

Walter


David Cole wrote:
> 
> 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
>>
> 
> _______________________________________________
> 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#a13725951
Sent from the VTK - Users mailing list archive at Nabble.com.




More information about the vtkusers mailing list