Boost logo

Boost-Build :

From: Reece Dunn (msclrhd_at_[hidden])
Date: 2005-11-07 16:25:04


Kevin Wheatley wrote:
> Has anything changed recently in HEAD to stop the linking of the Qt
> libraries when using BBv2? it looks to me like the Qt libraries are
> not being passed to the rsp files. The objects are compiled with the
> right includes etc, just the references to the libraries are not
> there... the two supplied examples don't work either. They used to
> work, I can't spot anthing in the actual qt4.jam file that has changed
> but I know that some work on the responce file handling has been going
> on so peraps that is where it comes from.

Can you try this patch and let me know if it doesn't work?

The original response file generation adds
    "$(LIBRARY_OPTION)$(FINDLIBS_ST)"
but uses logic to add .lib if the files don't have an extension. I could use
    "$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)"
but this overrides the extension, so linking with foo.a doesn't work.
This shouldn't matter, so the :S=.lib *should* also be ok, however I
would like this validated.

- Reece

Index: cw.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/cw.jam,v
retrieving revision 1.7
diff -u -r1.7 cw.jam
--- cw.jam 5 Nov 2005 07:46:38 -0000 1.7
+++ cw.jam 7 Nov 2005 21:07:52 -0000
@@ -171,15 +171,20 @@
 flags cw LINKFLAGS <main-target-type>LIB/<link>static : -library ;
 flags cw LINKFLAGS <main-target-type>LIB/<link>shared : -shared ;
 
-toolset.flags cw.link USER_LINKFLAGS <linkflags> ;
-toolset.flags cw.link LINKPATH <library-path> ;
+flags cw.link LIBRARIES <library> ;
+flags cw.link USER_LINKFLAGS <linkflags> ;
+flags cw.link LINKPATH <library-path> ;
 
 if [ os.name ] in NT
 {
    actions archive bind
    {
       if exist "$(<[1])" DEL "$(<[1])"
- $(.LD) -library -o "$(<[1])" @"@($(<[1]:W).rsp:E=$(nl)"$(>)")"
+ $(.LD) -library -o "$(<[1])" @"@($(<[1]:W).rsp:E=$(nl)"$(>)"
+ $(nl)$(LIBRARIES)
+ $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST)"
+ $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA)"
+ )"
    }
 }
 else # cygwin
@@ -190,17 +195,29 @@
       if test -f "$_bbv2_out_" ; then
          _bbv2_existing_="$(<:W)"
       fi
- $(.LD) -library -o "$(<:W)" $_bbv2_existing_ @"@($(<[1]:W).rsp:E=$(nl)"$(>)")"
+ $(.LD) -library -o "$(<:W)" $_bbv2_existing_ @"@($(<[1]:W).rsp:E=$(nl)"$(>)"
+ $(nl)$(LIBRARIES)
+ $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST)"
+ $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA)"
+ )"
    }
 }
 
 actions link bind DEF_FILE
 {
- $(.LD) -o "$(<[1]:W)" -L"$(LINKPATH)" $(LINKFLAGS) $(USER_LINKFLAGS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)")"
+ $(.LD) -o "$(<[1]:W)" -L"$(LINKPATH)" $(LINKFLAGS) $(USER_LINKFLAGS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)"
+ $(nl)$(LIBRARIES)
+ $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST)"
+ $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA)"
+ )"
 }
 
 actions link.dll bind DEF_FILE
 {
- $(.LD) -o "$(<[1]:W)" -implib "$(<[2]:W)" -L"$(LINKPATH)" $(LINKFLAGS) -f "$(DEF_FILE)" $(USER_LINKFLAGS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)")"
+ $(.LD) -o "$(<[1]:W)" -implib "$(<[2]:W)" -L"$(LINKPATH)" $(LINKFLAGS) -f "$(DEF_FILE)" $(USER_LINKFLAGS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)"
+ $(nl)$(LIBRARIES)
+ $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST)"
+ $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA)"
+ )"
 }
 
Index: msvc.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/msvc.jam,v
retrieving revision 1.62
diff -u -r1.62 msvc.jam
--- msvc.jam 5 Nov 2005 07:46:38 -0000 1.62
+++ msvc.jam 7 Nov 2005 21:08:52 -0000
@@ -538,11 +538,12 @@
 flags msvc.compile INCLUDES <include> ;
 
 # The actions differ only by explicit selection of input language
-actions compile.c bind RSP
+actions compile.c bind
 {
     $(.CC) /Zm800 -nologo -TC -U$(UNDEFS) $(CFLAGS) $(USER_CFLAGS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)-D$(DEFINES) $(nl)"-I$(INCLUDES)")" -c -Fo"$(<[1]:W)"
 }
-actions compile.c++ bind RSP
+
+actions compile.c++ bind
 {
     $(.CC) /Zm800 -nologo -TP -U$(UNDEFS) $(CFLAGS) $(C++FLAGS) $(USER_CFLAGS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)-D$(DEFINES) $(nl)"-I$(INCLUDES)")" -c -Fo"$(<[1]:W)"
 }
@@ -589,6 +590,7 @@
 flags msvc.link LINKPATH <library-path> ;
 
 
+flags msvc.link LIBRARIES <library> ;
 flags msvc.link FINDLIBS_ST <find-static-library> ;
 flags msvc.link FINDLIBS_SA <find-shared-library> ;
 flags msvc.link LIBRARY_OPTION <toolset>msvc : "" : unchecked ;
@@ -605,7 +607,12 @@
     actions archive bind
     {
         if exist "$(<[1])" DEL "$(<[1])"
- $(.LD) /lib /NOLOGO /out:"$(<[1])" @"@($(<[1]:W).rsp:E=$(nl)"$(>)")"
+ $(SETUP)
+ $(.LD) /lib /NOLOGO /out:"$(<[1])" @"@($(<[1]:W).rsp:E=$(nl)"$(>)"
+ $(nl)$(LIBRARIES)
+ $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST)"
+ $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA)"
+ )"
     }
 }
 else
@@ -613,7 +620,11 @@
     actions archive bind
     {
         $(RM) "$(<[1])"
- $(.LD) /lib /NOLOGO /out:"$(<[1])" @"@($(<[1]:W).rsp:E=$(nl)"$(>)")"
+ $(.LD) /lib /NOLOGO /out:"$(<[1])" @"@($(<[1]:W).rsp:E=$(nl)"$(>)"
+ $(nl)$(LIBRARIES)
+ $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST)"
+ $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA)"
+ )"
     }
 }
         
@@ -631,13 +642,22 @@
 
 actions link bind DEF_FILE
 {
- $(.LD) /NOLOGO $(LINKFLAGS) /out:"$(<[1]:W)" /INCREMENTAL:NO /LIBPATH:"$(LINKPATH:W)" $(USER_LINKFLAGS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)")"
+ $(SETUP)
+ $(.LD) /NOLOGO $(LINKFLAGS) /out:"$(<[1]:W)" /INCREMENTAL:NO /LIBPATH:"$(LINKPATH:W)" $(USER_LINKFLAGS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)"
+ $(nl)$(LIBRARIES)
+ $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST)"
+ $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA)"
+ )"
     $(MANIFEST)$(<[1]).manifest $(OUTPUTRESOURCE)$(<[1]);#2
 }
 
 actions link.dll bind DEF_FILE
 {
- $(.LD) /NOLOGO $(LINKFLAGS) /out:"$(<[1]:W)" /INCREMENTAL:NO /IMPLIB:"$(<[2]:W)" /LIBPATH:"$(LINKPATH:W)" /def:$(DEF_FILE) $(USER_LINKFLAGS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)")"
+ $(.LD) /NOLOGO $(LINKFLAGS) /out:"$(<[1]:W)" /INCREMENTAL:NO /IMPLIB:"$(<[2]:W)" /LIBPATH:"$(LINKPATH:W)" /def:$(DEF_FILE) $(USER_LINKFLAGS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)"
+ $(nl)$(LIBRARIES)
+ $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST)"
+ $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA)"
+ )"
     $(MANIFEST)$(<[1]).manifest $(OUTPUTRESOURCE)$(<[1]);#2
 }
 

 


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk