[Insight-users] Need tutorial tu use Itk with VS2005
Luis Ibanez
luis.ibanez at kitware.com
Mon Oct 12 13:05:04 EDT 2009
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...
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 :-)
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
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.
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