[vtkusers] brand new need help...

Trevis Crane trevis.crane at gmail.com
Fri Aug 31 10:15:58 EDT 2007


Hi all,

I'm brand new to VTK.  I got the user's guide from KitWare and am playing
with the first example -- the cone example.  In order to do this example, I
have to run CMake to create the .dsw workspace for Visual C++ 6.0 (this is
the IDE I'm working in).  Then I can compile it and run it and everything's
hunky dorey (sort of).

However, this seems like a lot of overhead to use VTK.  For example, using
the Boost libraries only requires that you make the pre-compiled libraries
and then tell the compiler where to look for them.  So, I wanted to try this
with vtk.

I started a new workspace, copied the cone.cpp file into my new workspace,
told the linker where to find the vtk binaries and gave it the path for
additional include directories.  For both of these I copy/pasted the same
paths that the workspace created by my use of CMake for the example used.

It didn't work.  I end up several link errors -- the error messages from the
compiler are shown below.

So, my question to you more experienced users is, should I always use
CMake?  If not, then how do I (easily) set up my workspace to allow for the
use of the vtk libraries?

thanks for any help you can provide,
trevis

Linking...
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _exit already defined in LIBCD.lib(
crt0dat.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _free already defined in LIBCD.lib(
dbgheap.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _malloc already defined in LIBCD.lib
(dbgheap.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _sprintf already defined in
LIBCD.lib(sprintf.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _abort already defined in LIBCD.lib(
abort.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _strncpy already defined in
LIBCD.lib(strncpy.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _strchr already defined in LIBCD.lib
(strchr.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _strstr already defined in LIBCD.lib
(strstr.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _tolower already defined in
LIBCD.lib(tolower.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _realloc already defined in
LIBCD.lib(dbgheap.obj)
LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other
libs; use /NODEFAULTLIB:library
Debug/cone.exe : fatal error LNK1169: one or more multiply defined symbols
found
Error executing link.exe.

cone.exe - 11 error(s), 1 warning(s)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070831/209bafbd/attachment.htm>


More information about the vtkusers mailing list