[Insight-users] Need tutorial tu use Itk with VS2005

Daanen Vincent daanen at koelis.com
Tue Oct 13 08:16:01 EDT 2009


Hi Luis, 

> -----Message d'origine-----
> De : Luis Ibanez [mailto:luis.ibanez at kitware.com] 
> Envoyé : lundi 12 octobre 2009 19:05
> À : Daanen Vincent
> Cc : insight-users at itk.org
> Objet : Re: [Insight-users] Need tutorial tu use Itk with VS2005
> 
> Hi Vincent,
> 
> 
> 0) Please NEVER use the /FORCE flag to silence link warnings.
>     Those warnigns are serious, and silencing them doesn't
>     solve any problem. It simply delays the danger and postpone
>     the issues to become run-time crashes once your application
>     reaches the hands of the final users.
> 
>     The /FORCE option shouldn't even be available...

Well, there is a case that I can not do without it, even Microsoft says to
use it in this case : when using uuid.lib, you may have multiple symbol
(constant) definition .. And Microsoft says to use /FORCe to build the
executable. I tried to not use it but I could never build my executable :(

> 
> 1) What the warnings are telling you is that you are combining
>     libraries that were build with incompatible compilation flags.
> 
>     For example a common mistake is to mix libraries that were
>      compiled for Release with libraries that were compiled for
>     Debug.  Another common mistake is to mix libraries that were
>      compiled for Multi-Threading, with libraries that were compiled
>      for Single-Threading.
> 
> 2)  You will not have to deal with these annoying errors
>      if you were using CMake to configure your application   :-)

That's drive me crazy : I use cmake and all is ok but when doing it without
cmake, my executable can't link ... Cmake is frightening black-box....

I hope I'll be able to build my "big project" with cmake easily ...

> 
> 3)  You will find tutorials on the use of ITK with Visual Studio at
> 
>                 http://www.itk.org/ITK/help/tutorials.html
> 
>       In particular you should look at:
> 
>       "Getting Started"
>        * http://www.itk.org/CourseWare/Training/GettingStarted-I.pdf
> 
>        "Integrating ITK with your Application"
>        * http://www.itk.org/CourseWare/Training/GettingStarted-V.pdf
> 
> 

Yes, I know these tutorials

> 4) The best way to proceed is to CMake-ify your application,
>      in this way, you entire project will be:
> 
>        a) Configured with consistent options
>        b) Setup for easy migration from one computer to another
>        c) On Big step closer to becoming multi-platform.
> 

One thing I do not know how to do is to specifiy different  include/link
directories for debug/release and also different libraires (we use a
decorated name for debug library: eg Toto.lib for release an TotoD.lib for
debug ....) but i will find (i hope so :) )

V


> 
> 
>   Regards,
> 
> 
>          Luis
> 
> 
> --------------------------------------------------------------
> ------------------------------
> On Mon, Oct 12, 2009 at 9:21 AM, Daanen Vincent 
> <daanen at koelis.com> wrote:
> > Dear itk users
> >
> > I'm trying to use ITK (3.16.0) into an already existing 
> application based on
> > MFC. The problems I have is that as soon as I have to link 
> against an ITK
> > library, the linker fails which tons of errors about 
> conflicts between
> > msvcrt(d).lib and libcmt(d).lib.
> >
> > I searched over the internet and these proposal of solutions :
> >  - exclude and try to find the good librairies order (MSDN advices)
> >  - use /FORCE flag
> >  - recompile itk with different "Use MFC librairies" 
> setting: I tried "Use
> > windows standard libraires" and "Use MFC in static lib" 
> since in linking
> > against MFC static libraires
> >
> > But none of them work.
> >
> > So I need someone to tell me what I have to do/check to use 
> Itk in a "full
> > of MFC'ies" project.
> >
> > Please help, I'm tired to waste my time :(
> >
> > V
> >
> > --------------------------------------------
> > Vincent Daanen, PhD
> > D&D Manager
> >
> > --------------------------------------------
> > KOELIS
> > 5, avenue du Grand Sablon 38700 La Tronche
> > www.koelis.com  -  daanen at koelis.com
> > Tel .+33(0) 476637588 Fax .+33(0) 476637592
> > --------------------------------------------
> >
> > CONFIDENTIALITY This e-mail and any attachments are 
> confidential and may
> > also be privileged. If you are not the named recipient, 
> please notify the
> > sender immediately and do not disclose the contents to 
> another person, use
> > it for any purpose, or store or copy the information in any medium.
> >
> > "Les problèmes ne peuvent être résolus par ceux dont 
> l'horizon se limite aux
> > réalités quotidiennes,  mais par ceux qui rêvent de choses 
> qui n'ont jamais
> > existé et qui se disent : Pourquoi Pas ?" (J-F Kennedy, 1963).
> >
> > _____________________________________
> > 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 ITK FAQ at: 
> http://www.itk.org/Wiki/ITK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.itk.org/mailman/listinfo/insight-users
> >



More information about the Insight-users mailing list