You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/maintainer/knowledge_base.md
+39Lines changed: 39 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -349,6 +349,45 @@ Some packages do not provide build systems with first-hand support for Windows,
349
349
You can use the [autotools_clang_conda](https://github.com/conda-forge/autotools_clang_conda-feedstock?tab=readme-ov-file#about-autotools_clang_conda-feedstock) to provide a build environment with a set of MSYS2 packages and a Clang toolchain configured to build packages compatible with MSVC.
350
350
The feedstock's description provides example instructions.
351
351
352
+
<a id="install-paths-and-naming-conventions"></a>
353
+
354
+
### Install paths and naming conventions
355
+
356
+
Unix-style packages in conda-forge are installed into a special `Library` directory tree under the build prefix.
357
+
For the convenience of writing build scripts, both conda-build and rattler-build define the following variables:
On Windows, it is not possible to link directly to dynamic libraries (`.dll` files); the linker needs to use so-called import libraries instead.
368
+
Import libraries have the same format and generally use the same suffix (`.lib`) as static libraries.
369
+
Therefore, whenever both dynamic and static libraries are installed, the import library and the static library must use different names.
370
+
There are two main naming conventions for installing libraries on Windows: the MSVC convention and the GCC/MinGW convention.
371
+
372
+
The MSVC convention uses the following names:
373
+
374
+
- dynamic library: `{name}.dll`(e.g. `zlib.dll`)
375
+
- import library: `{name}.lib`(e.g. `zlib.lib`)
376
+
- static library: no standard convention, often `lib{name}.lib` or `{name}-static.lib` (e.g. `zlibstatic.lib`)
377
+
378
+
Usually, `{name}` does not include a `lib` prefix.
379
+
Following this convention ensures that `-l{name}` works for dynamic linking, same as on Unix.
380
+
However, some packages do use `lib` prefix for historical reasons, e.g. `libprotobuf.dll` + `libprotobuf.lib`.
381
+
382
+
The GCC/MinGW convention uses the following names:
383
+
384
+
- dynamic library: `lib{name}.dll`
385
+
- import library: `lib{name}.dll.a`
386
+
- static library: `lib{name}.a`
387
+
388
+
There is no standard convention for providing SONAME-style versioning for libraries.
389
+
Some packages do not provide versioning at all, others embed the version into the `.dll` name (but not the import library name, to preserve `-l{name}` behavior).
0 commit comments