knik0 / faac

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

build: add pkg-config file, and get VS 2019 build working #36

Closed boxerab closed 4 years ago

boxerab commented 4 years ago

pkg-config file can be used by other projects such as gstreamer to link to faac on windows

fabiangreffrath commented 4 years ago

So, now we have a pkg-config file at least for Autotools builds.

boxerab commented 4 years ago

So, now we have a pkg-config file at least for Autotools builds.

:raised_hands:

boxerab commented 4 years ago

So, now we have a pkg-config file at least for Autotools builds.

raised_hands

Great, thanks! If we change the windows static library name to faac rather than libfaac then that pkg-config file could work for windows as well.

fabiangreffrath commented 4 years ago

So, in order to link with libfaac on Windows one has to type -llibfaac instead of -lfaac?

boxerab commented 4 years ago

So, in order to link with libfaac on Windows one has to type -llibfaac instead of -lfaac?

On windows (using MSVC compiler), the lib prefix is not automatically added to the library name. So, the name appearing after -l must exactly match the name of the windows library.

The current MSVC project uses unix-style library name, so it won't work with pkg-config file. For MINGW builds, the .pc file will work. But, I would recommend supporting MSVC instead.

boxerab commented 4 years ago

@fabiangreffrath what do you think about changing the windows static library name to faac rather than libfaac ?

fabiangreffrath commented 4 years ago

What changes are required for this?

boxerab commented 4 years ago

Thanks, I've created PR https://github.com/knik0/faac/pull/39 to address this one.

boxerab commented 4 years ago

WIth #39 merged, we could close this PR