Page 1 of 1

libsoxr library in Windows x64 platform

Posted: Fri Dec 28, 2012 10:37 am
by volkanozyilmaz
Hello,

I am trying to compile libsoxr library for Windows x64 platform.

In Windows x64 platform inline asm is not supported and these lines of code can't be compile;

static __inline int fetestexcept(int excepts)
{
short status_word;
__asm fnstsw status_word
return status_word & excepts & FE_ALL_EXCEPT;
}

static __inline int feclearexcept(int excepts)
{
int16_t status[14];
__asm fnstenv status
status[2] &= ~(excepts & FE_ALL_EXCEPT);
__asm fldenv status
return 0;
}

In 64bit OS X platform it is compiling because there is fenv.h file.

Is there a solution for this?

Best,

Re: libsoxr library in Windows x64 platform

Posted: Sat Dec 29, 2012 2:09 am
by Gale Andrews
volkanozyilmaz wrote:I am trying to compile libsoxr library for Windows x64 platform.
There is no need to build libsoxr separately. Just check out latest Audacity HEAD from SVN, open winaudacity.sln then press Build > Build Solution in VS 2008. See here: http://wiki.audacityteam.org/wiki/Developing_On_Windows .
volkanozyilmaz wrote: In Windows x64 platform inline asm is not supported and these lines of code can't be compile;

static __inline int fetestexcept(int excepts)
{
short status_word;
__asm fnstsw status_word
return status_word & excepts & FE_ALL_EXCEPT;
}

static __inline int feclearexcept(int excepts)
{
int16_t status[14];
__asm fnstenv status
status[2] &= ~(excepts & FE_ALL_EXCEPT);
__asm fldenv status
return 0;
}

In 64bit OS X platform it is compiling because there is fenv.h file.

Is there a solution for this?
Libsoxr is a third-party library so not directly related to Audacity.

Have you tried cmake http://www.cmake.org/cmake/resources/software.html ?

In spite of what you say, http://dl.dropbox.com/u/8835547/soxr-0. ... ce.tar.bz2 compiles in Release build for me on Windows 7 x64 VS 2008 using the vcproj file.

Or you can try latest git http://sourceforge.net/p/soxr/code/ci/c ... 1e0a/tree/ .

If you have some reason to build a standalone libsoxr and you have an issue you will need to contact the developer of the library (Rob Sykes) http://audacity.238276.n2.nabble.com/us ... ser=392503 .


Gale

Re: libsoxr library in Windows x64 platform

Posted: Sat Dec 29, 2012 8:11 am
by volkanozyilmaz
Hello Gale,

Thank you for your answer.

Your are right about that it is not directly related to Audacity. I will contact with Rob.

But I can't understand one think. x64 platform doesn't support inline asm. How you can compile this with inline asm in microsoft compiler / x64 platform.

I am using VC++ express 2012. I have looked the last version of libsoxr and these inline asm code still there.

Best,

Re: libsoxr library in Windows x64 platform

Posted: Sat Dec 29, 2012 12:32 pm
by volkanozyilmaz
Hello Again,

I could compile with MinGW64 gcc compilers. I just wanted to write here maybe because somebody else can need it.

Best,

Re: libsoxr library in Windows x64 platform

Posted: Sat Dec 29, 2012 11:00 pm
by Gale Andrews
volkanozyilmaz wrote:But I can't understand one think. x64 platform doesn't support inline asm. How you can compile this with inline asm in microsoft compiler / x64 platform.

I am using VC++ express 2012. I have looked the last version of libsoxr and these inline asm code still there.
I thought perhaps VS 2008 still supported inline ASM on x64, but according to this, not:
http://msdn.microsoft.com/en-us/library ... 90%29.aspx .

Or maybe it was because I moved the obj files into the src directory? There were other errors if I didn't do that. Or is it using MASM and I don't know that? Anyway, if Rob sheds some light on it, feel free to post.


Thanks


Gale

Re: libsoxr library in Windows x64 platform

Posted: Sun Dec 30, 2012 11:24 am
by volkanozyilmaz
Gale Andrews wrote:
volkanozyilmaz wrote:But I can't understand one think. x64 platform doesn't support inline asm. How you can compile this with inline asm in microsoft compiler / x64 platform.

I am using VC++ express 2012. I have looked the last version of libsoxr and these inline asm code still there.
I thought perhaps VS 2008 still supported inline ASM on x64, but according to this, not:
http://msdn.microsoft.com/en-us/library ... 90%29.aspx .

Or maybe it was because I moved the obj files into the src directory? There were other errors if I didn't do that. Or is it using MASM and I don't know that? Anyway, if Rob sheds some light on it, feel free to post.


Thanks


Gale

I don't know about vc2008's behavior, maybe it can compile (actually I don't think so). It is not about moving the obj files because it is about creating obj file. When you compile a file it will be an obj file first and I couldn't compile the file because of inline asm commands.

Now, with gcc I don't have any problem.

Thanks,