libsndfile in winodws

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

libsndfile in winodws

aishwarya selvaraj
Hi all ,
I was trying to build my .cpp file in windows in Windows platform (windows 10) using cmake .
My .cpp file makes use of two external libraries 1)armadillo 2)libsnd file.
I have written a corresponding cmakelist.txt to compile and obtain the binary .
I was successful in doing so in Linux , when it come to Windows I obtain the following error .

3>Time Elapsed 00:00:02.06
2>         Current branch master is up to date.
2>         No patch step for 'project_libsndfile'
2>         Performing autogen step for 'project_libsndfile'
2>         Performing configure step for 'project_libsndfile'
2>         'C:\Users\computing7\Desktop\TSM_cmake\build\lib\libsndfile\src\project_libsndfile\configure' is not recognized as an internal or external command,
2>         operable program or batch file.
2>     1>
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code 9009.
2>       Done executing task "CustomBuild" -- FAILED.
2>     1>
2>Done building target "CustomBuild" in project "project_libsndfile.vcxproj" -- FAILED.
2>
2>Build FAILED.


PFA of the cmakelist.txt in case for clarifications.
Why does this error come ?
Is it possible to compile and build libsndfile in windows successfully ?


--
Regards,
Aishwarya Selvaraj

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

CMakeLists.txt (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: libsndfile in winodws

Dan Liew
On 2 March 2017 at 12:07, aishwarya selvaraj
<[hidden email]> wrote:

> Hi all ,
> I was trying to build my .cpp file in windows in Windows platform (windows
> 10) using cmake .
> My .cpp file makes use of two external libraries 1)armadillo 2)libsnd file.
> I have written a corresponding cmakelist.txt to compile and obtain the
> binary .
> I was successful in doing so in Linux , when it come to Windows I obtain the
> following error .
>
> 3>Time Elapsed 00:00:02.06
> 2>         Current branch master is up to date.
> 2>         No patch step for 'project_libsndfile'
> 2>         Performing autogen step for 'project_libsndfile'
> 2>         Performing configure step for 'project_libsndfile'
> 2>
> 'C:\Users\computing7\Desktop\TSM_cmake\build\lib\libsndfile\src\project_libsndfile\configure'
> is not recognized as an internal or external command,
> 2>         operable program or batch file.

Above is your clue. Your build could not run `configure`. Your problem
is most likely in

```
ExternalProject_Add(project_libsndfile
    GIT_REPOSITORY     https://github.com/erikd/libsndfile.git
    PREFIX              lib/libsndfile
    CONFIGURE_COMMAND   <SOURCE_DIR>/configure
    BUILD_COMMAND       make
    BUILD_IN_SOURCE     1
    INSTALL_COMMAND     echo Skipping install step for libsndfile
)
```

Running a `configure` script is not going to work on Windows out of
the box because libsnd uses GNU autotools which is for made for UNIX
like operating systems. You should try and figure out how (if it's
even possible) to build libsnd on Windows. At glance at the GitHub
page shows they have a CMake build system but the docs say it will
likely only work on Linux. There are some commits that mention MINGW
so maybe it might be possible to build using the MSYS environment.

Good Luck.
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: libsndfile in winodws

aishwarya selvaraj
@Dan Liew
Thanks for your feedback.
Yes I was trying to proceed in that direction .
Did you find any links which could be useful ?
could you kindly share them ?
Thanks

On Thu, Mar 2, 2017 at 5:08 PM, Dan Liew <[hidden email]> wrote:
On 2 March 2017 at 12:07, aishwarya selvaraj
<[hidden email]> wrote:
> Hi all ,
> I was trying to build my .cpp file in windows in Windows platform (windows
> 10) using cmake .
> My .cpp file makes use of two external libraries 1)armadillo 2)libsnd file.
> I have written a corresponding cmakelist.txt to compile and obtain the
> binary .
> I was successful in doing so in Linux , when it come to Windows I obtain the
> following error .
>
> 3>Time Elapsed 00:00:02.06
> 2>         Current branch master is up to date.
> 2>         No patch step for 'project_libsndfile'
> 2>         Performing autogen step for 'project_libsndfile'
> 2>         Performing configure step for 'project_libsndfile'
> 2>
> 'C:\Users\computing7\Desktop\TSM_cmake\build\lib\libsndfile\src\project_libsndfile\configure'
> is not recognized as an internal or external command,
> 2>         operable program or batch file.

Above is your clue. Your build could not run `configure`. Your problem
is most likely in

```
ExternalProject_Add(project_libsndfile
    GIT_REPOSITORY     https://github.com/erikd/libsndfile.git
    PREFIX              lib/libsndfile
    CONFIGURE_COMMAND   <SOURCE_DIR>/configure
    BUILD_COMMAND       make
    BUILD_IN_SOURCE     1
    INSTALL_COMMAND     echo Skipping install step for libsndfile
)
```

Running a `configure` script is not going to work on Windows out of
the box because libsnd uses GNU autotools which is for made for UNIX
like operating systems. You should try and figure out how (if it's
even possible) to build libsnd on Windows. At glance at the GitHub
page shows they have a CMake build system but the docs say it will
likely only work on Linux. There are some commits that mention MINGW
so maybe it might be possible to build using the MSYS environment.

Good Luck.



--
Regards,
Aishwarya Selvaraj

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: libsndfile in winodws

Dave Flogeras
On Thu, Mar 2, 2017 at 8:47 AM, aishwarya selvaraj <[hidden email]> wrote:
@Dan Liew
Thanks for your feedback.
Yes I was trying to proceed in that direction .
Did you find any links which could be useful ?
could you kindly share them ?
Thanks

Running a `configure` script is not going to work on Windows out of
the box because libsnd uses GNU autotools which is for made for UNIX
like operating systems. You should try and figure out how (if it's
even possible) to build libsnd on Windows. At glance at the GitHub
page shows they have a CMake build system but the docs say it will
likely only work on Linux. There are some commits that mention MINGW
so maybe it might be possible to build using the MSYS environment.



Just my 0.02, but if I recall Eric doesn't (or didn't) support building directly on Windows.  This may have changed since VS must now support more of C99 as part of C11.

http://www.mega-nerd.com/libsndfile/win32.html

It has always been my best practice to either use his provided binaries, or cross compile using mingw on Linux, then move the binary and headers over.

Regards,
Dave


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: libsndfile in winodws

Dave Flogeras
On Thu, Mar 2, 2017 at 9:14 AM, Dave Flogeras <[hidden email]> wrote:
Just my 0.02, but if I recall Eric doesn't (or didn't) support building directly on Windows.


Pardon me, that should be Erik
 


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Loading...