$include_dir="/home/hyper-archives/boost-build/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-build] Alternative Generator for shared_lib without import_lib target
From: tr1gun (tr1gun_at_[hidden])
Date: 2014-03-04 13:23:52
Hello,
i faced the problem that a dll target created by the microsoft compiler,
doesn't create a lib file if no functions are exported.
This happens if you create a message dll which consists only of a
resource file (message file).
I modified the part "declare generators" in the msvc.jam file.
In the original it registered a dll generator:
generators.register [ new msvc-linking-generator msvc.link.dll : OBJ
SEARCHED_LIB STATIC_LIB IMPORT_LIB : SHARED_LIB IMPORT_LIB :
<toolset>msvc ] ;
I extended the requirements and used the suppress-import-lib feature.
It seems to be unused in the boost build source code and therefore it is
unclear for me what someone could expect from it.
In the end i registered two generators:
generators.register [ new msvc-linking-generator msvc.link.dll : OBJ
SEARCHED_LIB STATIC_LIB IMPORT_LIB : SHARED_LIB IMPORT_LIB :
<toolset>msvc <suppress-import-lib>false ] ;
generators.register [ new msvc-linking-generator msvc.link.dll : OBJ
SEARCHED_LIB STATIC_LIB IMPORT_LIB : SHARED_LIB : <toolset>msvc
<suppress-import-lib>true ] ;
The second generator only produces a SHARED_LIB target and so boost
build doesn't look for a lib file. Is this approach correct?
If yes should i submit a patch via trac?
Best regards,
Bernhard