Hello everyone,

I am doing all I can to build ITK on VS2012, but I am experiencing a
lot of trouble...

- I am using CMake.
- If I choose to build "static" (build_shared unchecked) ITK,
everything compiles fine.
- if I choose to build "shared" (build_shared checked), everything
compiles fine too. One ITKCommon-4.0.dll is created.

Now here the trouble...

When I try to compile a sample program with OpenSceneGraph, I have a
bunch of link errors of type :

ITKMetaIO-4.0.lib(metaObject.obj) : error LNK2005: "public: __thiscall
std::basic_ifstream<char,struct std::char_traits<char>
>::basic_ifstream<char,struct std::char_traits<char> >(void)"
(??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@XZ) already
defined in osgDB.lib(osg92-osgDB.dll)

Apparently, this kind of errors appear when a static library is linked
with a dynamic one...
I've checked in my "shared" ITK solution project : most of the
projects are still built in static mode.
I tried to force the "Use MFC in a Shared DLL" but it doesn't change anything.
If I force the Configuration Type to .dll, then I have a bunch of link
errors, like :

unresolved external symbol __imp__RegCloseKey@4 referenced in function
"public: static bool __cdecl
itksys::SystemTools::DeleteRegistryValue(char const *,enum
itksys::SystemTools::KeyWOW64)"
(?DeleteRegistryValue@SystemTools@itksys@@SA_NPBDW4KeyWOW64@12@@Z)

Any idea ?

Thank you very much !

Cheers,

Bruno
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://kitware.com/products/protraining.php

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-developers

Reply via email to