Hello Rashad,

Thank you for the input, it does provide insight into the possible problems.

This problem occurs "only" with OTB 4.2.1.
If I replace my OTB-SOURCE directory with OTB 4.0.0, I can compile in 64 
bits AND compile the HelloWorld example externally without any linkage 
issue... so it seems something changed between 4.0.0 and 4.2.1 to break 
external usage on windows.

Cheers,

DD

On Monday, 19 January 2015 16:51:10 UTC-5, Rashad wrote:
>
>
> Hello,
>
> Firs make sure there is no mess up in your system paths with different 
> osgeo4w and visual studio.  correct version and arch is used through out 
> OTB compilation. I am saying from rock bottom ie all osgeo4w dependencies 
> and with same osgeo4w (x86 or 64) that you are building OTB. 
>
> On Mon, Jan 19, 2015 at 4:33 PM, DavDub <[email protected] 
> <javascript:>> wrote:
>
>>
>> Here are added details:
>>
>> The same thing occurs with VS 2010 pro and VS 2012 pro (so both are NOT 
>> EXPRESS versions).
>>
>> I had VS 2010 EXPRESS also installed previously but it was causing 
>> problems with my WIN64 compilation of OTB so I uninstalled it both did not 
>> uninstall ALL VS 2010 professionnal (could this cause a problem?)
>>
>> I tried to compile with things from the osgeo4w x86 only setup and from 
>> the osgeo4wx86andx64 setup without success
>> I tried to compile in 32 bits or 64 bits and the results are the same 
>> when trying an external project using OTB code
>>
>
> So you have libs installed from osgeo4w ? Is that right? 
>
> And is it 32 or 64 bits or both?
>  
>
>> My compilation of OTB succeeds but trying to build HelloWorld as an 
>> external project (ex: c:\HelloWorld\src, c:\HelloWorld\bin instead 
>> of C:\Developpement\OTB\OTB-Source\Examples\Tutorials always give the 
>> external link error for vnl_vector ...
>>
>
>
> Maybe this has something to do with ITK keeping all vnl libs as 
> ITKVNL_LIBRARIES. you can see this commit in OTB.
>
> could you try latest mercurial version of OTB
>
> http://hg.orfeo-toolbox.org/OTB/rev/0bcc37c9dcb7
>
>
> http://hg.orfeo-toolbox.org/OTB/rev/82800bc94cc4
>
> From ITK list - 
> http://public.kitware.com/pipermail/insight-developers/2015-January/024216.html
>
> I am not so sure as I didn't reproduce the error on my side and hence maybe
>
> For one thing I have vs2010 express not pro edition.
>
> Hope that helps
>
>  
>
>>
>> DD
>>
>>
>> On Friday, 16 January 2015 14:42:36 UTC-5, DavDub wrote:
>>>
>>>
>>> Hi all!
>>>
>>> I was wondering if there was an update on this?
>>>
>>> I am still having this problem trying to use the simple HelloWorld test 
>>> program...
>>>
>>> If I try to build it with OTB-INSTALL/lib/otb, it does not link the ITK 
>>> folder from include/Utilities
>>>
>>> If I try to build with OTB-Bin, I get the linker errors mentionned above.
>>>
>>> Is this still related to mantis bug 0000837?
>>>
>>> DD
>>>
>>>
>>>
>>> On Monday, 8 September 2014 08:29:15 UTC-4, AleksD wrote:
>>>>
>>>> Hello
>>>>
>>>> In my experience this happens when you build your application with one 
>>>> set of dll-s but when application runs other dynamic libraries are 
>>>> loaded (so-called "dll hell"). 
>>>> I suggest you to run your application from OSGEO4W shell or simply copy 
>>>> your application to OSGEO4\bin folder and try to run it from there.
>>>>
>>>> With regards,
>>>> Aleksey Dmitriev
>>>>
>>>> 2014-09-07 14:51 GMT+09:00 Omran Al Hammadi <[email protected]>:
>>>>
>>>>>
>>>>> <https://lh3.googleusercontent.com/-kBaCQ-vrx1o/VAvyVKMb6ZI/AAAAAAAAItU/gNeTwoLwV0g/s1600/error.png>
>>>>> thanks alot Aleksey
>>>>>
>>>>> I have successfully build the hello world example. the problem i am 
>>>>> facing now is that the  application cannot run (see the attached picture).
>>>>>
>>>>> you help is highly appreciated
>>>>>
>>>>>
>>>>> <https://lh3.googleusercontent.com/-kBaCQ-vrx1o/VAvyVKMb6ZI/AAAAAAAAItU/gNeTwoLwV0g/s1600/error.png>
>>>>>
>>>>> regards
>>>>> Omran
>>>>>
>>>>> On Thursday, September 4, 2014 1:16:20 PM UTC+4, AleksD wrote:
>>>>>>
>>>>>> Maybe it was not quite right to write "I'm not followed the steps 
>>>>>> listed ..." because Preliminary Steps are necessery in any way. I mean 
>>>>>> that 
>>>>>> further only CMake was used to generate 
>>>>>> VS solution for OTB and tune some options without creating OTB.bat 
>>>>>> file as mentioned in wiki. One of tuned options is OTB_USE_EXTERNAL_ITK 
>>>>>> (see attached picture). By default OTB uses internal version of ITK. So 
>>>>>> your steps must be as follow:
>>>>>> 1) Download ITK from http://sourceforge.net/project
>>>>>> s/itk/files/itk/4.6/InsightToolkit-4.6.0.zip/download (or clone the 
>>>>>> repository http://itk.org/ITK.git)
>>>>>> 2) Unzip downloaded file to to any empty folder and using CMake 
>>>>>> generate solution for Visual Studio with proper generator. 
>>>>>> 3) Build this solution in Visual Studio IDE.
>>>>>> 4) Configure OTB in CMake. You need check  OTB_USE_EXTERNAL_ITK 
>>>>>> option as at picture. As a rule CMake can find ITK libraries 
>>>>>> automatically 
>>>>>> if they are not deep in subfolders.
>>>>>> 5) Generate OTB solution in CMake and build it in VS IDE
>>>>>>
>>>>>> After this step you can try to build your application.
>>>>>> Hope this helps you.
>>>>>>
>>>>>> With regards, 
>>>>>> Dmitriev Aleksey
>>>>>>  
>>>>>>
>>>>>> 2014-09-04 17:01 GMT+09:00 Omran Al Hammadi <[email protected]>:
>>>>>>
>>>>>> can you list the steps you followed if you don't mind
>>>>>>>
>>>>>>> many thanks mate
>>>>>>>
>>>>>>>
>>>>>>> On Thursday, September 4, 2014 11:58:56 AM UTC+4, AleksD wrote:
>>>>>>>
>>>>>>>> Hello
>>>>>>>> I'm not followed the steps listed in http://wiki.orfeo-toolbox.org/
>>>>>>>> index.php/OTB_%26_Windows_OS, i simply used CMake to generate VS 
>>>>>>>> solution for OTB and build it. There were no problems with building 
>>>>>>>> solution until updating source code to the latest revision.
>>>>>>>> Nevertheless i can confirm that using external ITK solves this 
>>>>>>>> issue and all my applications successfully linked.
>>>>>>>> Many thanks for your help!
>>>>>>>>
>>>>>>>> With regards,
>>>>>>>> Dmitriev Aleksey
>>>>>>>>
>>>>>>>>
>>>>>>>> 2014-09-04 12:36 GMT+09:00 Omran Al Hammadi <[email protected]>:
>>>>>>>>
>>>>>>>> yes i followed the steps in that link and i got this error
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Wednesday, September 3, 2014 4:23:19 PM UTC+4, Mickaël Savinaud 
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>>  Hi,
>>>>>>>>>> Have you follow the indications at http://wiki.orfeo-toolbox.org/
>>>>>>>>>> index.php/OTB_%26_Windows_OS
>>>>>>>>>> Mickaël
>>>>>>>>>> Le 03/09/2014 10:22, Aleksey Dmitriev a écrit :
>>>>>>>>>>  
>>>>>>>>>>   I want to join to this question. I also got such errors in my 
>>>>>>>>>> applications, based on OTB. They arise from ITKCommon-4.6.lib(
>>>>>>>>>> itkMetaDataObject.obj), for example linker output in MS Visual 
>>>>>>>>>> Studio Pro 2012 (Update 4) is the same as in above mail:
>>>>>>>>>>
>>>>>>>>>> I
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> *TKCommon-4.6.lib(itkMetaDataObject.obj) : error LNK2019: 
>>>>>>>>>> unresolved external symbol "public: __cdecl 
>>>>>>>>>> vnl_vector<char>::~vnl_vector<char>(void)" 
>>>>>>>>>> (??1?$vnl_vector@D@@QEAA@XZ) 
>>>>>>>>>> referenced in function "public: __cdecl 
>>>>>>>>>> itk::Array<char>::~Array<char>(void)" (??1?$Array@D@itk@@QEAA@XZ) 
>>>>>>>>>> ITKCommon-4.6.lib(itkMetaDataObject.obj) : error LNK2019: unresolved 
>>>>>>>>>> external symbol "public: class vnl_vector<char> & __cdecl 
>>>>>>>>>> vnl_vector<char>::operator=(class vnl_vector<char> const &)" 
>>>>>>>>>> (??4?$vnl_vector@D@@QEAAAEAV0@AEBV0@@Z) referenced in function 
>>>>>>>>>> "public: 
>>>>>>>>>> class itk::Array<char> const & __cdecl 
>>>>>>>>>> itk::Array<char>::operator=(class 
>>>>>>>>>> itk::Array<char> const &)" (??4?$Array@D@itk@@QEAAAEBV01@AEBV01@@Z) 
>>>>>>>>>> ITKCommon-4.6.lib(itkMetaDataObject.obj) : error LNK2019: unresolved 
>>>>>>>>>> external symbol "public: bool __cdecl 
>>>>>>>>>> vnl_vector<char>::set_size(unsigned 
>>>>>>>>>> int)" (?set_size@?$vnl_vector@D@@QEAA_NI@Z) referenced in function 
>>>>>>>>>> "public: 
>>>>>>>>>> void __cdecl itk::Array<char>::SetSize(unsigned int)" 
>>>>>>>>>> (?SetSize@?$Array@D@itk@@QEAAXI@Z) application1.exe : fatal error 
>>>>>>>>>> LNK1120: 
>>>>>>>>>> 3 unresolved externals*
>>>>>>>>>>
>>>>>>>>>>  I get the source code of OTB from the repository (rev. 16979, 
>>>>>>>>>> 4.2-rc1)
>>>>>>>>>>
>>>>>>>>>>  With regards,
>>>>>>>>>>  Dmitriev Aleksey
>>>>>>>>>>   
>>>>>>>>>>
>>>>>>>>>>  2014-09-03 14:26 GMT+09:00 Omran Al Hammadi <
>>>>>>>>>> [email protected]>:
>>>>>>>>>>
>>>>>>>>>>> Dear otb-users  
>>>>>>>>>>>
>>>>>>>>>>>  I am very new to OTB libraries and i successfully download and 
>>>>>>>>>>> compile OTB source code.
>>>>>>>>>>> Then I tried to run the hello world example and I was able to 
>>>>>>>>>>> generate the sln file.
>>>>>>>>>>> I opened the sln file to build it, but I couldn't. I got the 
>>>>>>>>>>> following errors:
>>>>>>>>>>>
>>>>>>>>>>>  *Error 1 error LNK2019: unresolved external symbol "public: 
>>>>>>>>>>> __cdecl vnl_vector<char>::~vnl_vector<char>(void)" 
>>>>>>>>>>> (??1?$vnl_vector@D@@QEAA@XZ) referenced in function "public: 
>>>>>>>>>>> __cdecl 
>>>>>>>>>>> itk::Array<char>::~Array<char>(void)" (??1?$Array@D@itk@@QEAA@XZ) *
>>>>>>>>>>>  
>>>>>>>>>>>  
>>>>>>>>>>>  *Error 2 error LNK2019: unresolved external symbol "public: 
>>>>>>>>>>> class vnl_vector<char> & __cdecl vnl_vector<char>::operator=(class 
>>>>>>>>>>> vnl_vector<char> const &)" (??4?$vnl_vector@D@@QEAAAEAV0@AEBV0@@Z) 
>>>>>>>>>>> referenced in function "public: class itk::Array<char> const & 
>>>>>>>>>>> __cdecl 
>>>>>>>>>>> itk::Array<char>::operator=(class itk::Array<char> const &)" 
>>>>>>>>>>> (??4?$Array@D@itk@@QEAAAEBV01@AEBV01@@Z) *
>>>>>>>>>>>  
>>>>>>>>>>>  *Error 3 error LNK2019: unresolved external symbol "public: 
>>>>>>>>>>> bool __cdecl vnl_vector<char>::set_size(unsigned int)" 
>>>>>>>>>>> (?set_size@?$vnl_vector@D@@QEAA_NI@Z) referenced in function 
>>>>>>>>>>> "public: class 
>>>>>>>>>>> itk::Array<char> const & __cdecl itk::Array<char>::operator=(class 
>>>>>>>>>>> itk::Array<char> const &)" (??4?$Array@D@itk@@QEAAAEBV01@AEBV01@@Z)*
>>>>>>>>>>>  
>>>>>>>>>>>  *Error 4 error LNK1120: 3 unresolved externals *
>>>>>>>>>>>  
>>>>>>>>>>>  
>>>>>>>>>>>  your help will be highly appreciated 
>>>>>>>>>>>
>>>>>>>>>>>  regards
>>>>>>>>>>> Omran
>>>>>>>>>>>  -- 
>>>>>>>>>>> -- 
>>>>>>>>>>> Check the OTB FAQ at
>>>>>>>>>>> http://www.orfeo-toolbox.org/FAQ.html
>>>>>>>>>>>  
>>>>>>>>>>> You received this message because you are subscribed to the 
>>>>>>>>>>> Google
>>>>>>>>>>> Groups "otb-users" group.
>>>>>>>>>>> To post to this group, send email to [email protected]
>>>>>>>>>>>
>>>>>>>>>>> To unsubscribe from this group, send email to
>>>>>>>>>>> [email protected]
>>>>>>>>>>>
>>>>>>>>>>> For more options, visit this group at
>>>>>>>>>>> http://groups.google.com/group/otb-users?hl=en
>>>>>>>>>>> --- 
>>>>>>>>>>> You received this message because you are subscribed to the 
>>>>>>>>>>> Google Groups "otb-users" group.
>>>>>>>>>>> To unsubscribe from this group and stop receiving emails from 
>>>>>>>>>>> it, send an email to [email protected].
>>>>>>>>>>>
>>>>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>>>>
>>>>>>>>>>  
>>>>>>>>>>  -- 
>>>>>>>>>> -- 
>>>>>>>>>> Check the OTB FAQ at
>>>>>>>>>> http://www.orfeo-toolbox.org/FAQ.html
>>>>>>>>>>  
>>>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>>>> Groups "otb-users" group.
>>>>>>>>>> To post to this group, send email to [email protected]
>>>>>>>>>>
>>>>>>>>>> To unsubscribe from this group, send email to
>>>>>>>>>> [email protected]
>>>>>>>>>>
>>>>>>>>>> For more options, visit this group at
>>>>>>>>>> http://groups.google.com/group/otb-users?hl=en
>>>>>>>>>> --- 
>>>>>>>>>> You received this message because you are subscribed to the 
>>>>>>>>>> Google Groups "otb-users" group.
>>>>>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>>>>>> send an email to [email protected].
>>>>>>>>>>
>>>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>   -- 
>>>>>>>>> -- 
>>>>>>>>> Check the OTB FAQ at
>>>>>>>>> http://www.orfeo-toolbox.org/FAQ.html
>>>>>>>>>  
>>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>>> Groups "otb-users" group.
>>>>>>>>> To post to this group, send email to [email protected]
>>>>>>>>> To unsubscribe from this group, send email to
>>>>>>>>> [email protected]
>>>>>>>>> For more options, visit this group at
>>>>>>>>> http://groups.google.com/group/otb-users?hl=en
>>>>>>>>> --- 
>>>>>>>>> You received this message because you are subscribed to the Google 
>>>>>>>>> Groups "otb-users" group.
>>>>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>>>>> send an email to [email protected].
>>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>>
>>>>>>>>
>>>>>>>>  -- 
>>>>>>> -- 
>>>>>>> Check the OTB FAQ at
>>>>>>> http://www.orfeo-toolbox.org/FAQ.html
>>>>>>>  
>>>>>>> You received this message because you are subscribed to the Google
>>>>>>> Groups "otb-users" group.
>>>>>>> To post to this group, send email to [email protected]
>>>>>>> To unsubscribe from this group, send email to
>>>>>>> [email protected]
>>>>>>> For more options, visit this group at
>>>>>>> http://groups.google.com/group/otb-users?hl=en
>>>>>>> --- 
>>>>>>> You received this message because you are subscribed to the Google 
>>>>>>> Groups "otb-users" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>>> send an email to [email protected].
>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>
>>>>>>
>>>>>>  -- 
>>>>> -- 
>>>>> Check the OTB FAQ at
>>>>> http://www.orfeo-toolbox.org/FAQ.html
>>>>>  
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "otb-users" group.
>>>>> To post to this group, send email to [email protected]
>>>>> To unsubscribe from this group, send email to
>>>>> [email protected]
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/otb-users?hl=en
>>>>> --- 
>>>>> You received this message because you are subscribed to the Google 
>>>>> Groups "otb-users" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>>> an email to [email protected].
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>>  -- 
>> -- 
>> Check the OTB FAQ at
>> http://www.orfeo-toolbox.org/FAQ.html
>>  
>> You received this message because you are subscribed to the Google
>> Groups "otb-users" group.
>> To post to this group, send email to [email protected] 
>> <javascript:>
>> To unsubscribe from this group, send email to
>> [email protected] <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/otb-users?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "otb-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Regards,
>    Rashad
>  

-- 
-- 
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html

You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to