[Insight-users] problem Release mode Visual C++

Juan Ramírez juanchoramirez at gmail.com
Tue Sep 27 19:35:29 EDT 2005


Hi Luis,

1. I uses VTK 4.2 and
2. Visual C++ 6

I compile my libraries VTK again in RelWithDebInfo for run my
application in debug and release mode.  ITK only in debug mode, but
the ploblem continues.  When i run my application in Release mode the
error is the following:

///////////////////////
Deleting intermediate files and output files for project 'TDI - Win32 Release'.
--------------------Configuration: TDI - Win32 Release--------------------
Building Custom Rule "C:\Documents and
Settings\Administrador\Escritorio\COMP_PROGRAMAS\TDI
26092005\src\CMakeLists.txt"
-- Check for working C compiler: cl -- works
-- Check for working CXX compiler: cl -- works
-- Loading VTK CMake commands
-- Loading VTK CMake commands - done
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Documents and
Settings/Administrador/Escritorio/COMP_PROGRAMAS/TDI 26092005/bin
Compiling resources...
Compiling...
ChildFrm.cpp
dlgAbrirSerie.cpp
ImageSliceViewer.cpp
MainFrm.cpp
StdAfx.cpp
TestBMP.cpp
TestBMPDoc.cpp
TestBMPView.cpp
Generating Code...
C:\Documents and Settings\Administrador\Escritorio\COMP_PROGRAMAS\TDI
26092005\src\ImageSliceViewer.cpp(282) : warning C4715:
'ImageSliceViewer::GetNumSlices' : not all control paths return a
value
Compiling...
DlgFilterBIF.cpp
DlgFilterGAD.cpp
DlgFilterGMIF.cpp
DlgFilterMIF.cpp
DlgFiltro_MeanF.cpp
DlgSegmentacion_OS.cpp
DlgSegmentacion_UC.cpp
DlgSegmentacion_WF.cpp
DlgUmbralizacionBinaria.cpp
DlgUmbralizacionGeneral.cpp
Generating Code...
Linking...
LINK : fatal error LNK1104: cannot open file "VTKRendering.lib"
Error executing link.exe.

TDI.exe - 1 error(s), 1 warning(s)
///////////////////////////////

And in RelWithDebInfo mode, it shows this:

--------------------Configuration: TDI - Win32
RelWithDebInfo--------------------
Linking...
LINK : fatal error LNK1104: cannot open file "ITKBasicFilters.lib"
Error executing link.exe.

TDI.exe - 1 error(s), 0 warning(s)

now I add cmakelists so that you say if is correct

PROJECT(TDI)

INCLUDE ($ENV{VTK_SOURCE_DIR}/Examples/GUI/Win32/vtkMFC/LocalUserOptions.cmake
OPTIONAL)


FIND_PACKAGE ( ITK)
    IF ( ITK_FOUND)
INCLUDE( ${USE_ITK_FILE} )
    ENDIF( ITK_FOUND)

IF (NOT USE_VTK_FILE)
  INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake)
ENDIF (NOT USE_VTK_FILE)

IF (USE_VTK_FILE)
  INCLUDE(${USE_VTK_FILE})
ENDIF (USE_VTK_FILE)

INCLUDE_DIRECTORIES(
 src
)

SET( TDI_SRCS
 MainFrm.h
 ChildFrm.h
 StdAfx.h
 TestBMP.h
 TestBMPDoc.h
 TestBMPView.h
 MainFrm.cpp
 ChildFrm.cpp
 StdAfx.cpp
 TestBMP.cpp
 TestBMPDoc.cpp
 TestBMPView.cpp
 ImageSliceViewer.h
 ImageSliceViewer.cpp
 dlgAbrirSerie.h
 dlgAbrirSerie.cpp
 TestBMP.rc
 res/TestBMP.ico
 res/TestBMP.rc2
 res/TestBMP.ico
 res/Toolbar.bmp
 TestBMP.clw
)

LINK_LIBRARIES(
  VTKRendering
  VTKGraphics
  VTKImaging
  VTKIO
  VTKFiltering
  VTKCommon
  VTKHybrid
  VTKCommon
  ITKBasicFilters
  ITKAlgorithms
  ITKIO

)


# add stuff to use MFC in this executable
ADD_DEFINITIONS(-D_AFXDLL)
SET(CMAKE_MFC_FLAG 6)

ADD_EXECUTABLE(TDI WIN32 ${TDI_SRCS})


thanks Luis.



Juan G. Ramírez
Estudiante de Ingeniería de Sistemas y Computación UPTC
Colombia


More information about the Insight-users mailing list