[vtkusers] A problem for the vtk compile warning

Mike Jackson mike.jackson at bluequartz.net
Sun Apr 12 22:05:00 EDT 2009


>From my experience this occurs when you compile with debug symbols on
but link against a "release" compiled library. So in your case you
probably built VTK as a "Release" but are trying to build your code
with debug symbols.

Basically _every_ third party library that you link against must built
the exact same way: Threading/no threading,  Debug symbols ON/OFF.

Hope that helps
Mike Jackson


On Sun, Apr 12, 2009 at 7:56 PM, K.P.TUNG <ktung at doc.ic.ac.uk> wrote:
> Hi everyone,
> When I compile my vtk code,
> the compilier shows
> "LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other
> libs; use /NODEFAULTLIB:library".
> After this msg, I cant get any execute file.
> I've followed possible methods from Internet to solve this, but these
> methods arenot working.
>
> My working environment is
> --
> WinXP SP3, VC2005, vtk5.2
> --
> My code is below
> --
> #include <vtkActor.h>
> using namespace std;
> int main()
> {
>     vtkActor* actor=vtkActor::New();
>     cout<<"hello";
>     return 0;
> }
> ---
>
> Does anyone can show me how to fix this problem?
>
>
>
> Kind Regards,
>
> Tom
>
> _______________________________________________
> 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