[vtkusers] _cdeclspec error with VTK 6.1.0 on visual studio 2012

Gib Bogle g.bogle at auckland.ac.nz
Sat Mar 29 20:05:45 EDT 2014


In support of Bill's recommendation:  I resisted using cmake for a while, but when I finally tried it I found that indeed it made my life much easier.  Now I use it for all my ITK and VTK programs.

Gib
________________________________________
From: vtkusers [vtkusers-bounces at vtk.org] on behalf of Bill Lorensen [bill.lorensen at gmail.com]
Sent: Sunday, 30 March 2014 10:31 a.m.
To: UJJWAL aryan
Cc: VTK Users
Subject: Re: [vtkusers] _cdeclspec error with VTK 6.1.0 on visual studio 2012

You have not specified all of the required VTK libraries.

On Sat, Mar 29, 2014 at 2:18 PM, UJJWAL aryan <meetukme at gmail.com> wrote:
> Hi Bill,
>
> I have not written any CMakeLists.txt file. I just wrote a simple VTK
> program and made a visual studio project using the configuration of x64 in
> Release mode. When I try to do the build, it gives at the end a linker error
> which I mentioned in my initial mail.
>
>
> On Sun, Mar 30, 2014 at 2:46 AM, Bill Lorensen <bill.lorensen at gmail.com>
> wrote:
>>
>> Please share the CMakeLists.txt file for your project.
>>
>>
>> On Sat, Mar 29, 2014 at 1:36 PM, UJJWAL aryan <meetukme at gmail.com> wrote:
>> > Hi,
>> >
>> > I built VTK 6.1.0 from source on Windows 7 64-bit system with Visual
>> > Studio
>> > 2012 Professional version installed. After building the ALL_BUILD and
>> > INSTALL projects in VTK/build I wrote a simple VTK program (I set up
>> > appropriate include and library directories, so I know that it is not a
>> > problem with paths). When I try to build this project , the build does
>> > not
>> > happen because  I end up with a linker error like this :
>> >
>> > vtk_1.obj : error LNK2019: unresolved external symbol
>> > "__declspec(dllimport)
>> > public: void __cdecl vtkRenderer::AddActor(class vtkProp *)"
>> > (__imp_?AddActor at vtkRenderer@@QEAAXPEAVvtkProp@@@Z) referenced in
>> > function
>> > main
>> >
>> > There are about 20 such linker errors. I have checked following things :
>> >
>> > a) build configuration is x64 in release mode ( problem remains the same
>> > same in the debug mode and win32 mode)
>> >
>> > b) Compiler configuration change from /MD to /Mt does not change
>> > anything.
>> >
>> > c) Adding \VTK\bin to system path also does not work.
>> >
>> > Can somebody help ?
>> >
>> > --
>> > Ujjwal
>> > IIIT Hyderabad
>> > Mob - 8142265628
>> > ujjwal at research.iiit.ac.in
>> >
>> >
>> >
>> > _______________________________________________
>> > Powered by www.kitware.com
>> >
>> > Visit other Kitware open-source projects at
>> > http://www.kitware.com/opensource/opensource.html
>> >
>> > Please keep messages on-topic and check the VTK FAQ at:
>> > http://www.vtk.org/Wiki/VTK_FAQ
>> >
>> > Follow this link to subscribe/unsubscribe:
>> > http://www.vtk.org/mailman/listinfo/vtkusers
>> >
>>
>>
>>
>> --
>> Unpaid intern in BillsBasement at noware dot com
>
>
>
>
> --
> Ujjwal
> IIIT Hyderabad
> Mob - 8142265628
> ujjwal at research.iiit.ac.in
>
>



--
Unpaid intern in BillsBasement at noware dot com
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers


More information about the vtkusers mailing list