knik0 / faac

Freeware Advanced Audio Coder faac mirror
https://sourceforge.net/projects/faac/
Other
179 stars 60 forks source link

how to build lib/dll with gcc in mingw, and use lib in msvc #31

Closed tom-chen-cn closed 5 years ago

tom-chen-cn commented 5 years ago

in windows , i use build the project in mingw. and use gcc link all .o to create .lib and .dll,then use them in msvc,but err: `error LNK2019: unresolved external symbol _faacEncGetCurrentConfiguration referenced in function "public: bool thiscall mediakit::AACEncoder::init(int,int,int)" (?init@AACEncoder@mediakit@@QAE_NHHH@Z) error LNK2019: unresolved external symbol _faacEncSetConfiguration referenced in function "public: bool thiscall mediakit::AACEncoder::init(int,int,int)" (?init@AACEncoder@mediakit@@QAE_NHHH@Z) error LNK2019: unresolved external symbol _faacEncOpen referenced in function "public: bool thiscall mediakit::AACEncoder::init(int,int,int)" (?init@AACEncoder@mediakit@@QAE_NHHH@Z) error LNK2019: unresolved external symbol _faacEncEncode referenced in function "public: int thiscall mediakit::AACEncoder::inputData(char ,int,unsigned char )" (?inputData@AACEncoder@mediakit@@QAEHPADHPAPAE@Z) error LNK2019: unresolved external symbol _faacEncClose referenced in function "public: virtual __thiscall mediakit::AACEncoder::~AACEncoder(void)" (??1AACEncoder@mediakit@@UAE@XZ)`

i think that i build lib have problem. i use gcc command:

./bootstrap ./configure --without-mp4v2 --enable-shared make make install gcc -shared -o libfaac.dll *.o -Wl,--output-def,libfaac.def,--out-implib,libfaac.lib