-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows MinGW Compiling #51
Comments
Hmm. I used to build the release binaries this way. I thought I had a makefile to automate it, but I can't find it. Do you mean cross-compiling for windows from a unix environment, or native windows mingw? IIRC the basis was something like
The tedious part is that you have to first do the same of all the dependencies: ogg, opus, opusfile, opusenc, and flac. |
Ok, here is what I was thinking of. It should be straightforward to adapt this to opus-tools. NB the dependency versions are out of date now. |
Thank you @rillian Well native or cross-compile don't bother me (even if I prefer native). Yes I have quite understood that we need to compile all the dependencies... I am absolutely not keen on compiling not my projects... I believe I am simply going to look at just using libraries but I have already given a few shots... Let say I want to compile this standalone Opus use file: https://pastebin.com/L5P2cyZS I have libraries available here ? https://archive.mozilla.org/pub/opus/win32/opusfile-v0.9-win32.zip If I do mingw32-g++ main.cpp -L "folderWhereIUnarchiveThePreviousFile" I always get: undefined reference to `opus_get_version_string' and others... (I tried this several times in the past weeks...) Ideas ? :/ EDIT: main.cpp is the code from the pastebin It seems that there isn't any available Window artifact here: #43 |
The Windows artifacts are now working again and can be downloaded from Appveyor. As for your link command, the libraries need to be listed at the end of the link command; add |
Indeed I am now able to build as it does on Appveyor, thanks a lot ! Nevertheless I am mainly interested in compiling my main.cpp with MinGW by adding the arguments -lopusfile -logg -lopus. But generated .lib files with msbuild aren't supported by MinGW which requires .a libraries. Where/how can I find them/build them please ? EDIT: Otherwise I get a bunch of errors like these: c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\Benjamin\Desktop\opus\inception\opusfile-v0.9-win32/opus.lib(Win32/Release/opus/celt_decoder.obj):(.text$mn+0xa): undefined reference to Or how can I build as done with Appveyor but just with MinGW and no msbuild ? |
@Benjamin-Loison i've answered in #173 |
how you solve this? |
For the record,
<URL: https://gitlab.xiph.org/xiph/liboggz/-/blob/master/.gitlab-ci.yml?ref_type=heads >
contain the following mingw recipe I created a few days ago.
autoconf-mingw:
extends: .autoconf
script:
- mkdir build-mingw
- git clone https://gitlab.xiph.org/xiph/ogg.git build-mingw/ogg-mingw
- (cd build-mingw/ogg-mingw && ./autogen.sh)
- (cd build-mingw/ogg-mingw && ./configure ${CONFIG_FLAGS})
- (cd build-mingw/ogg-mingw && make)
- ./autogen.sh
- (cd build-mingw && CPPFLAGS=-I`pwd`/ogg-mingw/include LDFLAGS=-L`pwd`/ogg-mingw/src ../configure ${CONFIG_FLAGS})
- (cd build-mingw && make)
variables:
CONFIG_FLAGS: --disable-shared --host=x86_64-pc-linux-gnu
INSTALL_COMPILER: gcc-mingw-w64
CC: x86_64-w64-mingw32-gcc
Luckily it only needed libogg as a dependency.
…--
Happy hacking
Petter Reinholdtsen
|
@vtorri What @dannywynn I have not solved my issue as far as I remember, but @petterreinholdtsen comment looks promising. I may give it a shot in the next months. |
Hello, I have been trying to use opus libs for months now but I can't achieve it.
If someone could tell me how exactly compile executable decoder/encoder for Windows using MinGW, I would be very grateful.
Because the only real answer I found (if don't want to use Visual Studio) is: Use executables...
Thank you
The text was updated successfully, but these errors were encountered: