Issues regarding Windows OS compilation
I just stumbled upon this software and since yesterday I've been trying to compile a .lib and .dll file to use in a simple OpenAL, WinAPI application. I find it impossible to do so. I do not use msys2/mingw on a daily basis. Please. I don't recall any other situation I had to compile 'makedepend' as MSYS2 does not provide it. I would be thankful if someone could provide me said .dll .lib or maybe to even be 100% sure the dependent libs and dlls.
That being said, It's likely I missed or misread something as I am not even sure if compiling this source code from Windows is even possible, and I'd gladly welcome an answer.
I am not sure if the error below is anyhow useful, as it is one of many I have stumbled. (It's cropped, as the whole log takes so many lines I do not wish to count them.) It appears for some reason it looks for a 32-bit MinGW toolchain when in fact I believe I'm running a 64-bit toolchain.
make[2]: Leaving directory '/home/Admin/opusfile/mingw/openssl-1.0.2u/test'
making depend in tools...
make[2]: Entering directory '/home/Admin/opusfile/mingw/openssl-1.0.2u/tools'
make[2]: Nothing to be done for 'depend'.
make[2]: Leaving directory '/home/Admin/opusfile/mingw/openssl-1.0.2u/tools'
make[1]: Leaving directory '/home/Admin/opusfile/mingw/openssl-1.0.2u'
make -C openssl-1.0.2u
make[1]: Entering directory '/home/Admin/opusfile/mingw/openssl-1.0.2u'
making all in crypto...
make[2]: Entering directory '/home/Admin/opusfile/mingw/openssl-1.0.2u/crypto'
/usr/bin/perl.exe ../util/mkbuildinf.pl "i686-w64-mingw32-gcc -I. -I.. -I../include -DOPENSSL_THREADS -D_MT -DDSO_WIN32 -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -fomit-frame-pointer -O3 -march=i486 -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM" "mingw" >buildinf.h
i686-w64-mingw32-gcc -I. -I.. -I../include -DOPENSSL_THREADS -D_MT -DDSO_WIN32 -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -fomit-frame-pointer -O3 -march=i486 -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -c -o cryptlib.o cryptlib.c
make[2]: i686-w64-mingw32-gcc: No such file or directory
make[2]: *** [<builtin>: cryptlib.o] Error 127
make[2]: Leaving directory '/home/Admin/opusfile/mingw/openssl-1.0.2u/crypto'
make[1]: *** [Makefile:288: build_crypto] Error 1
make[1]: Leaving directory '/home/Admin/opusfile/mingw/openssl-1.0.2u'
make: *** [Makefile:84: ssl_BUILD] Error 2
Hello.
I am in the same ship.
I did try to compile opusfile.dll using cmake and VS2015.
After hard fight and lot of white nights I finally get a opusfile.dll but only for x86, all try to build a library for x64 failed.
Also, sadly, the opusfile.dll x86 does not have any exported methods, so unusable.
I have used a old libopusfile.dll downloaded from a dll-download site and it is working like charm but only on Windows 7.
On Windows 10/11 sadly, for dealing with opus web-streams, I get a exception when trying to op_test_callbacks(), that is working perfectly with Linux and Windows 7.
All other methods work, like op_fopen to play opus files but op_test_callbacks() resists.
So the questions: is opusfile working on Windows 10/11 and did the core devs try opusfile.dll on Windows 10/11 compiled for x86/x64?
On Windows 10/11 sadly, for dealing with opus web-streams, I get a exception when trying to
op_test_callbacks(), that is working perfectly with Linux and Windows 7. All other methods work, likeop_fopento play opus files butop_test_callbacks()resists.
OK, fixed. Strangely, this method and op_open_callbacks() require the stdcall calling convention on Windows 10/11, all other methods accept cdecl.
And only these methods require stdcall; for example, registering the read, seek, tell and close callbacks requires cdecl on Windows; using stdcall crashes the program.
I'm glad the door is open to Windows 10/11 for opus web streaming, it works perfectly with the old opus.dll (with the stdcall fix).
The challenge now is to compile the latest opusfile commits, preferably with VS to reduce dependencies, for both x86 and x64, and especially to obtain a dynamic opusfile.dll file (and not just opusfile.lib).
Thanks for this great project, which deserves to be accessible on Windows 10/11 as well (PS: I'm not a Windows user).
Have good days and courage, hold on, opus/opusfile is a nice project.
And so I too have successfully compiled the library. My problem still remains. There is no information about said process. I have constructed the following note on how to compile opusfile as a Static Library .lib hope someone finds it useful :) Compiling OPUSFILE on Windows
Hello.
Here too with cmake + VS2015, the static lib opusfile.lib is created but I get no chance to create opusfile.dll dynamic lib.
Hello. Here too with cmake + VS2015, the static lib
opusfile.libis created but I get no chance to createopusfile.dlldynamic lib.
For now I am satisfied with just the .lib file build. However I did tried to produce the dynamic library today and the funny thing is I managed to produce a .dll but now I am unable to generate an import library .lib to support the .dll. I suspect the .dll generated file is then corrupted.
Hello. Here too with cmake + VS2015, the static lib
opusfile.libis created but I get no chance to createopusfile.dlldynamic lib.For now I am satisfied with just the
.libfile build. However I did tried to produce the dynamic library today and the funny thing is I managed to produce a .dll but now I am unable to generate an import library .lib to support the .dll. I suspect the .dll generated file is then corrupted.
What i did is:
- build https://github.com/openssl/openssl/releases/tag/OpenSSL_1_0_2a as
static lib - build https://github.com/xiph/opus.git as
static lib - build https://github.com/xiph/ogg.git as
static lib - In the solution properties of
opusfileI changed the settings to generate aDynamic Library(chatgpt tells nicely what settings those are) - and linked the following libraries:
- ws2_32.lib
- Crypt32.lib
- C:\OpenSSL_1_0_2\lib\libeay32.lib
- C:\OpenSSL_1_0_2\lib\ssleay32.lib
- C:\Projects\temp\ogg\build\Release\ogg.lib
- C:\Projects\temp\opus\build\Release\opus.lib
Hello. Here too with cmake + VS2015, the static lib
opusfile.libis created but I get no chance to createopusfile.dlldynamic lib.For now I am satisfied with just the
.libfile build. However I did tried to produce the dynamic library today and the funny thing is I managed to produce a .dll but now I am unable to generate an import library .lib to support the .dll. I suspect the .dll generated file is then corrupted.What i did is:
* build https://github.com/openssl/openssl/releases/tag/OpenSSL_1_0_2a as `static lib` * build https://github.com/xiph/opus.git as `static lib` * build https://github.com/xiph/ogg.git as `static lib` * In the solution properties of `opusfile` I changed the settings to generate a `Dynamic Library` (chatgpt tells nicely what settings those are) * and linked the following libraries: * ws2_32.lib * Crypt32.lib * C:\OpenSSL_1_0_2\lib\libeay32.lib * C:\OpenSSL_1_0_2\lib\ssleay32.lib * C:\Projects\temp\ogg\build\Release\ogg.lib * C:\Projects\temp\opus\build\Release\opus.lib
Wow, many thanks, I will try it.
Hum, could it be possible to give here, as attachment the opusfile.dll you get, and are you able to compile for x64?
In the solution properties of opusfile I changed the settings to generate a Dynamic Library (chatgpt tells nicely what settings those are)
Is it in cmake or in visual studio to change the settings?
In the solution properties of opusfile I changed the settings to generate a Dynamic Library (chatgpt tells nicely what settings those are)
Is it in cmake or in visual studio to change the settings?
Visual Studio -> I Used the following pre existing solution file: https://github.com/xiph/opusfile/tree/master/win32/VS2015
Ha, ok, I will try, thanks, but strange that you get this site, here there is no win32/vs2015 page:
OK, you used the "master" branch, I used the default "main" branch.
If I may, I dont find this opusfile project much friendly to use for developers (or maybe it is the goal...).
Wow, many thanks, I will try it.
Hum, could it be possible to give here, as attachment the opusfile.dll you get, and are you able to compile for x64?
I am really sorry i missed that message.
Here are the dll's I have created https://wormhole.app/vbnLAM#fSOrxJp0J6oZGsr0oBmodA
Also I have no further interest in making the .dll's my complaint stays. It is the same as yours there is no documentation on that topic. GL to you and others :)
Wow, many thanks, I will try it. Hum, could it be possible to give here, as attachment the opusfile.dll you get, and are you able to compile for x64?
I am really sorry i missed that message.
Here are the dll's I have created https://wormhole.app/vbnLAM#fSOrxJp0J6oZGsr0oBmodA
Also I have no further interest in making the .dll's my complaint stays. It is the same as yours there is no documentation on that topic. GL to you and others :)
Many, many thanks, I will test those gems asap.
Have a perfect day.
Fre;D
Ok, unzip in Linux dont like the " " in the file name:
unzip Wormhole vbnLAM.zip = not happy :( unzip Wormhole_vbnLAM.zip = very happy :)
So sorry for the noise and thanks for the dll's. I will try those dll asap once I find a Windows 10/11 machine.
Seems like people were able to help each other here. Feel free to open a more specific issue if you're still having problems.