Thank you for clarifying that Rashad,

I passed the bat file with the source, build and install directories (all
directories exist):

C:\MyOTBDir>C:\MyOTBDir\OTB.bat C:\MyOTBDir\src C:\MyOTBDir\build
C:\MyOTBDir\src

And I get the following output:

[image: Inline image 1]

So to summarize, the errors are:
*- Cmake Error: The source directory"C:/MyOTBDir/build/|--" does not exist*
This is obviously wrong since the source folder is /src and does contain
the latest source files. Could this also have something to do with the
forward slash "/"? Windows uses the backslash "\"as far a I know.

*- '-G' is not recognized as an internal or external command.....file*

*- The filename, directory name, or volume label syntax is incorrect*

*-error: could not load cache*

I copy pasted the script straight out of the softwareguide 4.4.0.

On Wed, May 6, 2015 at 11:12 AM, Rashad M <[email protected]>
wrote:

>
>
> On Wed, May 6, 2015 at 3:01 PM, GiNN <[email protected]> wrote:
>
>>
>> All,
>>
>> I am interested in the functions of OTB 4.4, specifically the BandmathX.
>> I uderstand I need to build it fro source and this is where I have no
>> experience.
>>
>> I found these instructions :
>> http://wiki.orfeo-toolbox.org/index.php/Windows_Build
>> But I fail when running configure in Cmake:
>>
>> CMake Error at CMakeLists.txt:19 (project):
>> No CMAKE_CXX_COMPILER could be found.
>>
>
> this is because your visual studio compiler is not found by cmake.  you
> dont need to configure cmake, the bat file does that for you.
>
>
>> Regarding Gdal, I should be okay since I already installed it via Osgeo4W
>> for use within QGis.
>>
>> Next I read the software guide version 4.4.0 for compiling otb on windows
>> which lists the dependencies needed (I already have them).
>> The instructions then say to make a batch file, I copy paste the text and
>> run in in an Osgeo4W shell and get:
>>
>> The system cannot find the path specified.
>>  You need to provide 3 arguments to the script:
>>  1. path to the source directory
>>  2. path to the build directory (an empty directory)
>> 3. path to the installation directory (an empty directory)
>>
>
> open osgeo4w shell
>
> and call your .bat file with arguments
>
> ex:
>
> build_otb.bat C:\sources\OTB C:\build\OTB c:\install\OTB
>
> make sure you have those directories created  C:\build\OTB and
> C:\install\OTB
>
>
>> So my questions:
>> - How do I input my src, build and install directories into the batch
>> file? I tried to paste them while replacing %1,%2 and %3 resp. in the .bat
>> But got the same error
>> - If I get the batch file to run successfully, what will be the next step?
>>
>
> you will have OTB installed.
>
>
>> - Also, is it a problem if I have both the 32 bit and 4 bit Osgeo4W? some
>> packages I use only come in 32 bit while I sometimes need the 64 bit.
>>
>
> dont mix 32bit and 6bit dlls. If you dont have all dlls for 64bit from
> osgeo4w, then use 32bit
>
>>
>> Running W8 64, Cmake 3.2.2, Visual Studio 10 2010.
>>
>> Thank you in advance for any assistance.
>>
>> --
>> --
>> 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.
>>
>
>
>
> --
> 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 a topic in the
> Google Groups "otb-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/otb-users/ZIwEcuG-kns/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Ginny Bijnaar, Bsc
Paramaribo, Suriname, South America
(+597) 852-2703

-- 
-- 
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.
@echo off
call "C:\Program Files (x86)\Microsoft Visual Studio 
10.0\Common7\Tools\vsvars32.bat"
set /A ARGS_COUNT=0
for %%A in (%*) do set /A ARGS_COUNT+=1
if %ARGS_COUNT% NEQ 3 (goto :Usage)
if NOT DEFINED OSGEO4W_ROOT (goto :NoOSGEO4W)
set src_dir=%1
set build_dir=%2
set otb_install_dir=%3
set current_dir=%CD%
set LANG=C
set ITK_AUTOLOAD_PATH=
set PYTHONPATH=
set PATH=%OSGEO4W_ROOT%\apps\swigwin\;%PATH%
cd %build_dir%
cmake %src_dir% ˆ
-G "Visual Studio 10" ˆ
-DBUILD_EXAMPLES:BOOL=ON ˆ
-DOTB_WRAP_QT:BOOL=ON ˆ
-DOTB_WRAP_PYTHON:BOOL=ON ˆ
-DPYTHON_LIBRARY:FILEPATH="%OSGEO4W_ROOT%/apps/Python27/libs/python27.lib" ˆ
-DPYTHON_INCLUDE_DIR:PATH="%OSGEO4W_ROOT%/apps/Python27/include" ˆ
-DPYTHON_EXECUTABLE:FILEPATH="%OSGEO4W_ROOT%/bin/python.exe" ˆ
-DOTB_USE_OPENCV:BOOL=ON ˆ
-DCMAKE_INSTALL_PREFIX:PATH=%otb_install_dir% ˆ
-DCMAKE_CONFIGURATION_TYPES:STRING=Release;RelWithDebInfo
cmake --build . --target INSTALL --config RelWithDebInfo
cd %current_dir%
goto :END
:Usage
echo You need to provide 3 arguments to the script:
echo 1. path to the source directory
echo 2. path to the build directory (an empty directory)
echo 3. path to the installation directory (an empty directory)
GOTO :END
:NoOSGEO4W
echo You need to run this script from an OSGeo4W shell
GOTO :END
:END

Reply via email to