-
Notifications
You must be signed in to change notification settings - Fork 235
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
mingw support #58
Comments
That missing symbol is provided by soundio.c which is compiled into soundio.c.obj, which it looks like you are producing. Can you provide the output of |
Also can you show the contents of config.h? |
https://gist.github.com/tresf/c6ec7a3f7939d351e433
/*
* Copyright (c) 2015 Andrew Kelley
*
* This file is part of libsoundio, which is MIT licensed.
* See http://opensource.org/licenses/MIT
*/
#ifndef SOUNDIO_CONFIG_H
#define SOUNDIO_CONFIG_H
#define SOUNDIO_VERSION_MAJOR 1
#define SOUNDIO_VERSION_MINOR 1
#define SOUNDIO_VERSION_PATCH 0
#define SOUNDIO_VERSION_STRING "1.1.0"
/* #undef SOUNDIO_HAVE_JACK */
/* #undef SOUNDIO_HAVE_PULSEAUDIO */
/* #undef SOUNDIO_HAVE_ALSA */
/* #undef SOUNDIO_HAVE_COREAUDIO */
/* #undef SOUNDIO_HAVE_WASAPI */
#endif Your |
Hmm I don't think configure step was successful. |
it is, here: https://github.com/andrewrk/libsoundio/blob/master/CMakeLists.txt#L180 |
It appears that the find package scripts don't look in the default mingw include directories. I added them for now, but if there's a better way to do this (such as add it directly to the modules), let me know and I'll add it to a PR. Next, I hit this error which I could not resolve unless I disabled Here's the latest fixes which enable |
And the build log, for reference...
|
WASAPI only, sorry got a bit ambitious with that statement, fixed in fork via tresf@2d016bd. |
If you build in release mode, which you should do if you're producing a .DLL for shipping with lmms, then it disables -Werror so that -Wall can't prevent the build from working. According to your cmake output you're building in Debug mode. |
|
On Windows it's pretty normal to not use PulseAudio (you said PortAudio but I think you meant PulseAudio?). A Windows build of libsoundio that only has the wasapi backend is reasonable. |
In the spirit of not crippling mingw builds, I've replaced In addition, per suggestion, I've made I did have to keep out Last, I tested on mingw64 and found a typo. Fixed and squashed. Next, I'll try on msys2 to see if a Windows machine running mingw can build this. Then issue a pull request. |
Ok, msys2 is configuring now via tresf@ec21e2f. But now I'm getting an issue importing a header... Here's the message... [ 2%] Building C object CMakeFiles/libsoundio_shared.dir/src/soundio.c.obj
/mingw64/bin/gcc -Dlibsoundio_shared_EXPORTS -O3 -DNDEBUG @CMakeFiles/libsoundio_shared.dir/includes_C.rsp -std=c11 -fvisibility=hidden -Wall -Werror=strict-prototypes -Werror=old-style-definition -D_REENTRANT -D_POSIX_C_SOURCE=200809L -o CMakeFiles/libsoundio_shared.dir/src/soundio.c.obj -c /home/Tres/libsoundio/src/soundio.c
In file included from C:/msys64/home/Tres/libsoundio/src/soundio_private.h:11:0,
from C:/msys64/home/Tres/libsoundio/src/soundio.c:8:
+ C:/msys64/home/Tres/libsoundio/src/soundio_internal.h:14:29: fatal error: soundio/soundio.h: No such file or directory
compilation terminated.
CMakeFiles/libsoundio_shared.dir/build.make:55: recipe for target 'CMakeFiles/libsoundio_shared.dir/src/soundio.c.obj' failed
make[2]: *** [CMakeFiles/libsoundio_shared.dir/src/soundio.c.obj] Error 1
make[2]: Leaving directory '/home/Tres/libsoundio/build'
CMakeFiles/Makefile2:192: recipe for target 'CMakeFiles/libsoundio_shared.dir/all' failed
make[1]: *** [CMakeFiles/libsoundio_shared.dir/all] Error 2
make[1]: Leaving directory '/home/Tres/libsoundio/build'
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2 |
Ok, it appears cmake keeps turning It's a hack, but fixed via: set(CMAKE_GENERATOR "MSYS Makefiles") Msys recommends passing @hotgloupi, not quite MSVC, but it's a successful compile on Windows nonetheless (#49). |
Since I haven't had any push-back on this conceptually, I wrote up a wiki tutorial for building on either Linux or Windows. Any adjustments are welcome as I wrote this mostly from memory. https://github.com/andrewrk/libsoundio/wiki/Compiling-for-Windows Of course, the tutorial won't work unless #59 is merged, so anyone trying it out before hand would first have to clone |
Looks like the wiki and README.md are sufficient. |
I've started this via: master...tresf:master
I'm not a C/C++ programmer, so I'm having difficulties with the compilation issues. I'm sure these are all very basic. Help appreciated...
The text was updated successfully, but these errors were encountered: