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

Martijn van Beurden mvanb1 at gmail.com
Wed Jun 7 05:39:03 UTC 2023


I've added the following to Windows-MSVC.cmake, which I copied from
Windows-GNU.cmake

set(CMAKE_IMPORT_LIBRARY_PREFIX "lib")
set(CMAKE_SHARED_LIBRARY_PREFIX "lib")
set(CMAKE_SHARED_MODULE_PREFIX  "lib")
set(CMAKE_STATIC_LIBRARY_PREFIX "lib")
set(CMAKE_FIND_LIBRARY_PREFIXES "lib" "")

When I do that, I still get the same warning:

libogg.exp : warning LNK4070: /OUT:ogg.dll directive in .EXP differs
from output filename
'C:\Users\m_van\flac\build\objs\Release\libogg.dll'; ignoring
directive

So, apparently either CMake or MSVC is forgetting to rename something,
somewhere.

Op wo 7 jun 2023 om 05:11 schreef Dave Yeo <dave.r.yeo at gmail.com>:
>
> On 06/06/23 02:33 AM, m b wrote:
> > 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.
> >
>
> Might have to figure out where cmake is installed on Windows, find the
> file Modules\Platform\Windows.cmake and edit the line
> set(CMAKE_SHARED_LIBRARY_PREFIX "")          # lib
> to
> SET(CMAKE_SHARED_LIBRARY_PREFIX "lib")
> Which will of course cause all DLL's to have the lib prefix.
> Might be a different Platform file to edit too as I'm making assumptions
> and haven't actually tested, no Windows here.
> Dave
> _______________________________________________
> 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