[flac-dev] How to change the dynamic library project name ogg to libogg?

Martijn van Beurden mvanb1 at gmail.com
Tue Jun 6 19:33:45 UTC 2023


Hi,

This rabbit hole went quite a bit deeper than I expected. Apparently,
CMake prepends 'lib' to library names for unix like environments
(including MinGW) but not for Visual Studio. So, when building on
Windows, you get either libFLAC.dll and libogg.dll or FLAC.dll and
ogg.dll depending on what toolchain you're using. I'm not quite sure
whether this makes sense. I've tried quite a few ways to override this
behaviour, but the most obvious solutions didn't work.

Sorry, I've been trying various things for two hours today, I give up.
Perhaps someone else on this list knows the answer.

Kind regards,

Martijn van Beurden

Op di 6 jun 2023 om 11:33 schreef m b <mvetnk at email.com>:

>
> Hi,
>
> I use CMake to generate FLAC dynamic link library projects for Visual Studio, in the CMake user interface window, the "BUILD_SHARED_LIBS" is enabled. The CMake generates the FLAC and ogg dynamic library projects.  The Visual Studio builds the FLAC.dll and ogg.dll, and the FLAC.dll depends on ogg.dll.
>
> However, in my previous projects, the file name of the dynamic library for ogg is libogg.dll, now the FLAC.dll (version 1.4.2) required ogg.dll, I have to make a copy of libogg.ll and rename it to ogg.dll, they are duplicate files. So I want the CMake-generated project file name is libogg, not ogg. I check the CMakeLists.txt and confilgure file in flac-1.4.2, and don't find how to change ogg project name to libogg.
>
> Thank you for your help!
>
> Regards,
> Mike
> _______________________________________________
> flac-dev mailing list
> flac-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/flac-dev


More information about the flac-dev mailing list