bug-automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to create shared library(dll) without lib prefix ?


From: Roumen Petrov
Subject: How to create shared library(dll) without lib prefix ?
Date: Sat, 14 Jul 2007 23:06:07 +0300
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.10) Gecko/20070306 SeaMonkey/1.0.8

Let a project use libtool to make libraries.

When building shared libraries on unix usually Makefile.am contain lib_LTLIBRARIES = 
lib<NAME>.la and result is lib<NAME>.so...

In case of mingw build (cross-compilation) in many cases is good dll to be 
without lib prefix.
In these cases cross-compilation can create dlls with same names as native 
build and those dlls can be used instead native build.
The name of import library can left libNAME.dll.a.

How to do this?


- libtool macro AC_LIBTOOL_SYS_DYNAMIC_LINKER don't preserve "libname_spec" set by CONFIG_SITE so 
that I cannot use "libname_spec="\$name"" in CONFIG_SITE file;
- same for "soname_spec";
- LDFLAGS -module is only to use a "nonstandard" name, but this is not my case 
since for other systems lib prefix is fine;


More info:
Command:
$i386-mingw32msvc-gcc -shared  ... -o .libs/<NAME>.dll ... -Xlinker --out-implib -Xlinker 
.libs/lib<NAME>.dll.a"
create dll without lib prefix and put <NAME>.dll in import library, but libtool run command 
with argument "-o .libs/lib<NAME>.dll".


Roumen





reply via email to

[Prev in Thread] Current Thread [Next in Thread]