Fixed Linux (and hopefully macOS) compile and linker errors.

This commit is contained in:
casey langen 2017-11-25 23:31:19 -08:00
parent 1a15e084c7
commit 5d9e24019d
3 changed files with 5 additions and 3 deletions

View File

@ -35,6 +35,7 @@
#pragma once
#include "IBuffer.h"
#include <stddef.h>
namespace musik { namespace core { namespace sdk {

View File

@ -11,8 +11,9 @@ if (${LINK_STATICALLY} MATCHES "true")
find_library(MP3LAMELIB NAMES libmp3lame.a mp3lame)
find_library(OGGLIB NAMES libogg.a ogg)
find_library(VORBISLIB NAMES libvorbis.a vorbis)
find_library(VORBISENCLIB NAMES libvorbisenc.a vorbisenc)
find_library(VORBISFILELIB NAMES libvorbisfile.a vorbisfile)
target_link_libraries(stockencoders ${musikcube_LINK_LIBS} ${MP3LAMELIB} ${OGGLIB} ${VORBISLIB} ${VORBISFILELIB})
target_link_libraries(stockencoders ${musikcube_LINK_LIBS} ${MP3LAMELIB} ${OGGLIB} ${VORBISLIB} ${VORBISENCLIB} ${VORBISFILELIB})
else()
target_link_libraries(stockencoders ${musikcube_LINK_LIBS} ogg vorbis vorbisfile mp3lame)
target_link_libraries(stockencoders ${musikcube_LINK_LIBS} ogg vorbis vorbisenc vorbisfile mp3lame)
endif()

View File

@ -155,7 +155,7 @@ void LameEncoder::Finalize(const char* uri) {
#ifdef WIN32
FILE* fp = _wfopen(utf8to16(uri).c_str(), L"r+b");
#else
FILE* fp = fopen(uri, L"a+b");
FILE* fp = fopen(uri, "a+b");
#endif
if (fp) {
if (!fseek(fp, 0, SEEK_SET)) {