Hi Rashad.
I using x64 when initializing msvc environment, and download the xdk 
document from 
https://www.orfeo-toolbox.org//packages/xdk/OTB-5.9/OTB-5.9.0-xdk-win64.zip. I 
developed otb with msvc2015 on win7 by 
https://wiki.orfeo-toolbox.org/index.php/OTB_development_on_Windows. It 
built successfully, but when I read an image, there is an error. and the 
main cpp of MyOTB.exe is the OTB's 
Examples/DataRepresentation/Image/Image2.cxx, 
just as follow:
int main(int, char * argv[])
{
     typedef unsigned char PixelType;
const unsigned int Dimension = 2;
typedef otb::Image<PixelType, Dimension> ImageType; 
typedef otb::ImageFileReader<ImageType> ReaderType; 
ReaderType::Pointer reader = ReaderType::New(); 
reader->SetFileName("img.JPG"); 
reader->Update();
ImageType::Pointer image = reader->GetOutput();
return EXIT_SUCCESS;
}
   

在 2017年2月24日星期五 UTC+8下午9:41:20,Rashad写道:
>
>
>
> On Friday, February 24, 2017 at 9:41:24 AM UTC+1, Yan wrote:
>>
>>
>>  Hello all,
>>  I'm learning use OTB now by VS2015 and developing it by 
>> https://wiki.orfeo-toolbox.org/index.php/OTB_development_on_Windows. 
>> However, when I read a image, there is error as follow, and I cann't find 
>> the reason.
>>
>>
>> <https://lh3.googleusercontent.com/-xq-CrzSC0Qg/WK_xMkK3uzI/AAAAAAAAACg/4WPXijP01EUVfqEF9avOc1L5fhWSs2YiQCLcB/s1600/%25E6%258D%2595%25E8%258E%25B7.JPG>
>>  Can someone help me to solve my problem?
>>  Thanks in advance
>>
>
> Obivously, you missed some steps. 
>
> All I can say from this is nothing. you have a segfault or access 
> violation as they are known in windows land.
>
> So I am going to ask questions from which me or someone could guess or 
> maybe find the problem.
>
> did you set environment correctly.?  using x86 or x64 when initializing 
> msvc environment and later using correct xdk package.
>
> how do we reproduce this issue? given that we don't have access to your 
> machine or whatever code that make up MyOTB.exe
> You will have better help if you could provide more information. Because a 
> segfault can be N number of things if guessed. where N is no where near to 
> 0!
>
>
>  Yan
>>
>

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