IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

C++ Discussion :

compilation boost gzip


Sujet :

C++

  1. #1
    Membre du Club
    Profil pro
    Inscrit en
    Novembre 2005
    Messages
    94
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2005
    Messages : 94
    Points : 66
    Points
    66
    Par défaut compilation boost gzip
    bonsoir/bonjour,

    Est ce que quelqu'un peut me dire comment compiler dans boost.iostream et sous windows gzip pour obtenir la lib boost correspondante SVP.
    En effet, lorsque j'utilise jam j'obtiens bien la librairie correspondant a boost.iostream mais ensuite dans le code qui me permet de compresser des fichiers il m'est demandé la lib boost correspondant à gzip.

    Merci beaucoup chers amis developpeurs.

  2. #2
    Membre averti Avatar de Nogane
    Profil pro
    Inscrit en
    Juin 2008
    Messages
    241
    Détails du profil
    Informations personnelles :
    Âge : 43
    Localisation : France

    Informations forums :
    Inscription : Juin 2008
    Messages : 241
    Points : 323
    Points
    323
    Par défaut
    Bonsoir,
    Il faut d'abord avoir téléchargé le code de la libbzip2.
    Ensuite, il suffit de dire a boost ou le trouver, en passant certaine variables a boost.Build, ou en les ajoutant dans vos variables d'environnements.

    Building with Boost.Build

    Je ne sait plus précisément quels variables sont nécessaire, mais il suffit d'essayer

  3. #3
    Membre régulier
    Homme Profil pro
    .
    Inscrit en
    Octobre 2014
    Messages
    174
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France, Essonne (Île de France)

    Informations professionnelles :
    Activité : .
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Octobre 2014
    Messages : 174
    Points : 90
    Points
    90
    Par défaut
    Bonjour,

    Je souhaiterais savoir comment compiler Iostreams sous ubuntu avec Jamfile.V2 pour boost version: 1.57.0
    Sachant que je possède la lib zlib-1.2.8 & bzip2-1.0.6
    Je ne comprend pas vraiment les parametre à saisire ni la ligne de commande pour lancer la compile de la lib iostreams.
    Je suis encore débutant.
    Pour le moment dans le fichier Jamfile.v2 j'ai modifié:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    project /boost/iostreams : source-location /home/user/Documents/Conti/boost_1_57_0/libs/iostreams/src ;
    mais je dois apparentement modifier aussi :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
     
    import modules ;
    import os ;
    import path ;
    import ac ;
    or je ne sais pas quelles paramètres sont attendu ni ou les chercher.
    De plus à en croire le forum sur le site officiel: https://svn.boost.org/trac/boost/ticket/9156
    il y a quelques subtilités dont il faut se méfier.

    PS: le fichier Jam complet:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
     
    # Boost.Iostreams Library Build Jamfile
     
    # (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
    # (C) Copyright 2004-2007 Jonathan Turkanis
    # Distributed under the Boost Software License, Version 1.0. (See accompanying 
    # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
     
    # See http://www.boost.org/libs/iostreams for documentation.
     
    project /boost/iostreams : source-location /home/user/Documents/Conti/boost_1_57_0/libs/iostreams/src ;
     
    # The biggest trick in this Jamfile is to link to zlib and bzip2 when
    # needed. To configure that, a number of variables are used, which must
    # be set by user with 'path-constant' either in Boost's root Jamfile, or
    # in user-config.jam.
     
    # For each library with either link to existing binary, or build
    # a library from the sources.
     
    import modules ;
    import os ;
    import path ;
    import ac ;
    local debug = [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ] ;
     
    for local v in NO_COMPRESSION 
                   NO_ZLIB ZLIB_SOURCE ZLIB_INCLUDE ZLIB_BINARY ZLIB_LIBPATH
                   NO_BZIP2 BZIP2_SOURCE BZIP2_INCLUDE BZIP2_BINARY BZIP2_LIBPATH
    {
        $(v) = [ modules.peek : $(v) ] ;
    }
     
    if $(NO_COMPRESSION) != 1 && $(NO_ZLIB) != 1
    {
        using zlib : : <build-name>boost_zlib <tag>@tag : : true ;
    }
    else
    {
        if $(debug)
        {
            ECHO "notice: iostreams: not using zlib compression " ;
        }
    }
     
     
    # Given a name of library, either 'zlib', or 'bzip2', creates the necessary
    # main target and returns it. If compression is disabled, returns nothing.
    # The 'sources' argument is the list of sources names for the library,
    # which will be used if building the library.
    rule create-library ( library-name : windows-name unix-name : sources + : requirements * )
    {
        local LIB = $(library-name:U) ;
        if ! $(library-name) in zlib bzip2
        {
            EXIT "Wrong library name passed to 'create-library' in libs/iostream/build/Jamfile.v2" ;
        }
     
        if [ os.name ] = NT && ! $($(LIB)_SOURCE) && ! $($(LIB)_INCLUDE)
        {
            if $(debug)
            {
                ECHO "notice: iostreams: not using $(library-name) compression " ;
            }        
            NO_$(LIB) = 1 ;
     
    	# This is necessary to that test Jamfiles don't run compression
    	# tests when not needed. Dirty, but I don't have time to
    	# write full-blow project module for zlib and bzip2.
    	modules.poke : NO_$(LIB) : 1 ;
        }
     
        if $(NO_COMPRESSION)
        {
            if ! $(NO_COMPRESSION) in 0 1
            {
                ECHO "warning: NO_COMPRESSION should be either '0' or '1'" ;
            }        
        }
     
        if $(NO_$(LIB))
        {
            if ! $(NO_$(LIB)) in 0 1
            {
                ECHO "warning: NO_$(LIB) should be either '0' or '1'" ;
            }        
        }
     
        if  $(NO_COMPRESSION) = 1 || $(NO_$(LIB)) = 1
        {
            if $(debug)
            {
                ECHO "notice: iostreams: not using $(library-name) compression " ;
            }        
        }
        else    
        {
            if ! $($(LIB)_INCLUDE) 
            {
                $(LIB)_INCLUDE = $($(LIB)_SOURCE) ;
            }
     
            # Should we use prebuilt library or build it ourselves?        
            if $($(LIB)_SOURCE)
            {
                return [ lib boost_$(library-name) 
                  : [ path.glob $($(LIB)_SOURCE) : $(sources).c ]
                  : <include>$($(LIB)_INCLUDE)
    	        <location-prefix>$(LIB:L)
    	        $(requirements)
                  :
                  : <include>$($(LIB)_INCLUDE)
                  ] ;                        
            }
            else
            {
                if $(debug)
                {
                    ECHO "notice: iostreams: using prebuilt $(library-name)" ;
                }
     
                # Should use prebuilt library.
                if ! $($(LIB)_BINARY)
                {
                    # No explicit name specified, guess it.
                    if [ os.name ] = NT
                    {
                        $(LIB)_BINARY = $(windows-name) ;
                        lib boost_$(library-name) : : <name>$(windows-name) ;
                    }
                    else
                    {
                        $(LIB)_BINARY = $(unix-name) ;
                    }                                                
                }            
                return [ lib boost_$(library-name) 
                  : 
                  : <name>$($(LIB)_BINARY)  
                    <search>$($(LIB)_LIBPATH)  
                  :
                  : <include>$($(LIB)_INCLUDE)
                  ] ;
     
            }                
        }        
    }
     
     
    local sources = file_descriptor.cpp mapped_file.cpp ;
    local bz2 = [ create-library bzip2 : libbz2 bz2 : 
        blocksort bzlib compress crctable decompress huffman randtable :
        <link>shared:<def-file>$(BZIP2_SOURCE)/libbz2.def ] ;
     
    if $(bz2)
    {
        sources += boost_bzip2 bzip2.cpp ;
    }
     
    lib boost_iostreams 
        : $(sources) 
        : <link>shared:<define>BOOST_IOSTREAMS_DYN_LINK=1 
          <define>BOOST_IOSTREAMS_USE_DEPRECATED
          [ ac.check-library /zlib//zlib : <library>/zlib//zlib
            <source>zlib.cpp <source>gzip.cpp ]
        :
        : <link>shared:<define>BOOST_IOSTREAMS_DYN_LINK=1
        ;
     
    boost-install boost_iostreams ;

    Merci à vous

Discussions similaires

  1. Compiler Boost avec plusieurs MSVC installés
    Par camboui dans le forum Boost
    Réponses: 5
    Dernier message: 07/09/2009, 12h07
  2. erreur de compilation boost.regex
    Par beambeam dans le forum Boost
    Réponses: 2
    Dernier message: 31/03/2009, 21h50
  3. [compilation] boost::asio winsock.h déjà inclu ?
    Par Deneteth dans le forum Boost
    Réponses: 3
    Dernier message: 20/02/2009, 13h57
  4. installation compilation Boost
    Par grossbug dans le forum Boost
    Réponses: 8
    Dernier message: 24/09/2008, 15h41
  5. Compiler Boost 1.35.0 (filesystem et date)
    Par djkamikaz dans le forum Boost
    Réponses: 41
    Dernier message: 07/04/2008, 11h41

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo