Skip to content
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

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

Closed
tom-chen-cn opened this issue Sep 29, 2019 · 0 comments
Closed

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

tom-chen-cn opened this issue Sep 29, 2019 · 0 comments

Comments

@tom-chen-cn
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant