-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
Hello!
I'm honestly writing this more for informational purposes, in case someone else wants to compile on Linux and wants a few pointers. Getting it compiling on Linux requires a few code changes, and I don't know the best way to make something like this more crossplatform (my C/C++ is extraordinarily rusty). I also wouldn't expect you to support an extra OS or anything, of course. :)
Anyway, this compiles and runs just fine on Linux with a few minor changes:
- Case-sensitivity:
#include "ReVorb.h"at the top ofrevorb.cppneeds to be#include "revorb.h"instead (that, or the header file renamed to have the capital letters) - Lack of "safe" C11 Annex K functions (the
*_sfunctions) in glibc/gcc. There's more than one Linux implementation of these out there, but the one I used was https://github.com/rurban/safeclib - this won't be found by default on most Linux machines. After installing/compiling that, add#include <libsafec/safe_lib.h>and#include <libsafec/safe_str_lib.h>torevorb.h - Other header changes: In
revorb.h, remove the include forio.hand substituteunistd.h _unlinkdoesn't exit -- just change those instances tounlinkinstead, inrevorb.cpp. There's two instances. (This is whatunistd.hprovides)- Linux doesn't distinguish between text/binary while reading from STDIN, and doesn't have
_setmode(or_fileno). Just comment out those lines inrevorb.cppentirely. There's two instances of that. I did verify that reading in the file via stdin produces the same output as from a file.
So, do all that, and it compiles/runs just fine with:
g++ -o revorb -logg -lvorbis -lsafec-3.6.0 revorb.cpp
I'm attaching a patch with all the changes that I mentioned. As I say, not expecting any of this to get merged in or whatever. If I ever get enthusiastic enough to draft up a "proper" PR for this, I'll submit it that way.
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation