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 :

error C2208 log4cxx


Sujet :

C++

  1. #1
    Membre actif
    Profil pro
    Inscrit en
    Juillet 2007
    Messages
    203
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2007
    Messages : 203
    Points : 220
    Points
    220
    Par défaut error C2208 log4cxx
    Bonjour à tous,

    J'essaie d'utiliser la librairie de trace log4cxx http://logging.apache.org/log4cxx/index.html

    Le problème c'est que j'ai l'erreur de compilation ci-dessous dès que j'inclue le fichier "log4cxx\logger.h"
    error C2208: 'volatile unsigned int'*: aucun membre défini à l'aide de ce type
    Ci-dessous le fichier "objectimpl.h" de la librairie log4cxx dans lequel ce situe l'erreur. La ligne en cause est "mutable unsigned int volatile ref;"

    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
    /*
     * Licensed to the Apache Software Foundation (ASF) under one or more
     * contributor license agreements.  See the NOTICE file distributed with
     * this work for additional information regarding copyright ownership.
     * The ASF licenses this file to You under the Apache License, Version 2.0
     * (the "License"); you may not use this file except in compliance with
     * the License.  You may obtain a copy of the License at
     *
     *      http://www.apache.org/licenses/LICENSE-2.0
     *
     * Unless required by applicable law or agreed to in writing, software
     * distributed under the License is distributed on an "AS IS" BASIS,
     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
     
    #ifndef _LOG4CXX_HELPERS_OBJECT_IMPL_H
    #define _LOG4CXX_HELPERS_OBJECT_IMPL_H
     
    #include <log4cxx/helpers/object.h>
     
    namespace log4cxx
    {
       namespace helpers
       {
          /** Implementation class for Object.*/
          class LOG4CXX_EXPORT ObjectImpl : public virtual Object
          {
    	  public:
             ObjectImpl();
             virtual ~ObjectImpl();
             void addRef() const;
             void releaseRef() const;
     
          protected:
    	    mutable unsigned int volatile ref;
     
            private:
                            //
                //   prevent object copy and assignment
                //
                ObjectImpl(const ObjectImpl&);
                ObjectImpl& operator=(const ObjectImpl&);
          };
       }
    }
     
    #endif //_LOG4CXX_HELPERS_OBJECT_IMPL_H
    J'ai essayé en supprimant le mutable et le volatile mais ça ne change rien.

    Si quelqu'un à une idée je suis preneur.

    Merçi

  2. #2
    screetch
    Invité(e)
    Par défaut
    ref est un mot clé en C++/CLI je crois, ou bien ref a été defini comme unem acro qui se remplace par "*"
    du coup, ca fait juste un (tres grand) type :
    mutable volatile unsigned int *
    et il n y a pas de nom de variable.
    Tu peux verifier si tu compiles en C++/CLI, desactiver si tu en a pas besoin, ou bien (craaaaaaade) definir "ref" a "_ref" pour te debarasser de ce mot clé

  3. #3
    Membre actif
    Profil pro
    Inscrit en
    Juillet 2007
    Messages
    203
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2007
    Messages : 203
    Points : 220
    Points
    220
    Par défaut
    Merçi screetch c'est bien ça le problème.

    Comme j'ai les sources de log4xx j'ai renommé la variable "ref" et j'ai tout recompilé, du coup j'ai plus de soucis.

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. ERROR: pg_atoi: zero-length string
    Par steelspirit92 dans le forum PostgreSQL
    Réponses: 1
    Dernier message: 23/08/2003, 22h29
  2. [SQL Server] Error converting data type varchar...
    Par Sir Tengu dans le forum MS SQL Server
    Réponses: 9
    Dernier message: 13/06/2003, 10h46
  3. [Kylix] Kylix c++ error
    Par pacpac dans le forum EDI
    Réponses: 2
    Dernier message: 10/06/2003, 16h27
  4. [CR] Print Engine error text
    Par afaraji dans le forum SAP Crystal Reports
    Réponses: 1
    Dernier message: 03/09/2002, 15h44
  5. [Kylix] Runtime error 230 avec INDY
    Par Anonymous dans le forum EDI
    Réponses: 2
    Dernier message: 23/03/2002, 11h51

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