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 :

est ce qu'il est possible de réorienter le compilateur gcc


Sujet :

C++

  1. #1
    Nouveau Candidat au Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2013
    Messages
    13
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Maroc

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Enseignement

    Informations forums :
    Inscription : Avril 2013
    Messages : 13
    Points : 1
    Points
    1
    Par défaut est ce qu'il est possible de réorienter le compilateur gcc
    s'il vous plaît je suis entraîne recompiler pour link les bibliothèque j'ai rencontré un problème pour opensuse le compilateur gcc il cherche en première temps les includes avant d'aller de savoir dans qu'il point il aurais besoin ces includes ,par exemple
    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
    170
    171
     #ifndef TimingREPORT_H
    #define TimingREPORT_H
    //
    //
    //
    //  V 1.1  01/09/2000
    //    Fast timing on Pentium
    //    on/off control introduced
    //    fixed format output
    //  V 1.2  21/02/2001
    //    cpu time added
    //    not thread safe yet...
    
    #include <string>
    
    #ifndef CMS_NO_HASH_MAP
    #include <hash_map>
    #include "Utilities/GenUtil/interface/stringhash.h"
    #else
    #include <map>
    #endif
    
    #include<iosfwd>
    
    #include "Utilities/Notification/interface/BaseEvent.h"
     #include "CommonDet/BasicDet/interface/AlignmentPositionError.h"
    
    #include "Utilities/GenUtil/interface/CMSTimers.h"
    
    /*  a class to manage Timing
    **/
    class TimingReport {
    public:
      typedef BaseEvent< std::pair<double,double> > ItemObserver;
    
      class Item {
        typedef BaseEvent< std::pair<double,double> > MyObserver;
      public:
        Item() : on(true), cpuon(true), counter(0), o(0){}
        Item & switchOn(bool ion) {on=ion; return *this;} 
        Item & switchCPU(bool ion) {cpuon=ion; return *this;} 
        void start() { if (on) {counter++; if (cpuon) cpuwatch.start(); stopwatch.start(); }}
        void stop(){ 
          if (on) {
    	stopwatch.stop(); 
    	if (cpuon) cpuwatch.stop();
    	if (active()) return; 
    	if (o) (*o)(std::pair<double,double>(stopwatch.lap().seconds(),
    					cpuwatch.lap().seconds()));
          }
        }
      public:
        bool active() const { return stopwatch.running();}
        void setObs(MyObserver * io) { o=io;}
        double realsec() const;
        double realticks() const;
        double cpusec() const;
      public:
        bool on;
        bool cpuon;
        int counter;
        StopWatch stopwatch;
        CPUWatch cpuwatch;
        MyObserver * o;
    
      };
    
    public:
      static TimingReport * current();
    
    protected:
    
    #ifndef CMS_NO_HASH_MAP
      typedef hash_map< std::string, Item, hash<std::string>, std::equal_to<std::string> > SMAP; 
    #else
      typedef std::map< std::string, Item, std::less<std::string> > SMAP;
    #endif
    
      TimingReport();
    
    public:
      ~TimingReport();
    
      ///
      void dump(std::ostream & co, bool active=false);
    
      /// report in ticks
      bool & inTicks() { return inTicks_;}
    
      /// switch all on
      void switchOn(bool ion);
    
      /// switch one ion
      void switchOn(const std::string& name, bool ion) {
        registry[name].switchOn(ion);
      }
    
      void start(const std::string& name) {
        if(on) registry[name].start();
      }
      void stop(const std::string& name) {
        if (on) registry[name].stop();
      }
      
      Item & operator[](const std::string& name) {
        SMAP::iterator p = registry.find(name);
        if (p!=registry.end()) return (*p).second;
        return make(name);
      }
      
      const Item & operator[](const std::string& name) const {
        SMAP::const_iterator p = registry.find(name);
        if (p!=registry.end()) return (*p).second;
        return const_cast<TimingReport*>(this)->make(name);
      }
    
      Item & make(const std::string& name) {
        return registry[name].switchOn(on);
      }
    
      const bool & isOn() const { return on;} 
    
    private:
      
      bool on;
      bool inTicks_;
      SMAP registry;
    
    
    };
    
    /** a class to time a "scope" to be used as a "Sentry".
    Just create a TimeMe object giving it a name;
    exiting the scope the object will be deleted;
    the constuctor starts the timing.
    the destructor stops it.
     */
    class TimeMe{
    
    public:
       ///
      explicit TimeMe(const std::string& name, bool cpu=true) :
        item((*TimingReport::current())[name]) {
        item.switchCPU(cpu);
        item.start();
      }
    
      explicit TimeMe(TimingReport::Item & iitem, bool cpu=true) :
        item(iitem) {
        item.switchCPU(cpu);
        item.start();
      }
    
      std::pair<double,double> lap() const { 
        return std::pair<double,double>(item.stopwatch.lap().seconds(),
    			       item.cpuwatch.lap().seconds());
      }
     
      ///
      ~TimeMe() {
        item.stop();
      }
      
    private:
      
      TimingReport::Item & item;
      
    };
    
    
    #endif
    alors il me demande de vérifier le chemin de #include "CommonDet/BasicDet/interface/AlignmentPositionError.h" même si on est plus besoin de ce fichier ma question :est ce qu'il ya une FLAGS pour le réorienter

  2. #2
    Expert éminent sénior
    Avatar de Médinoc
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Septembre 2005
    Messages
    27 369
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Septembre 2005
    Messages : 27 369
    Points : 41 519
    Points
    41 519
    Par défaut
    Non, le compilo ne peut pas vérifier d'abord si ton code référence un identificateur déclaré dans le fichier avant d'inclure le fichier.

    En fait, comment le pourrait-il? Vu qu'avant d'inclure le fichier, le compilo ne sait pas où l'identificateur est défini!
    SVP, pas de questions techniques par MP. Surtout si je ne vous ai jamais parlé avant.

    "Aw, come on, who would be so stupid as to insert a cast to make an error go away without actually fixing the error?"
    Apparently everyone.
    -- Raymond Chen.
    Traduction obligatoire: "Oh, voyons, qui serait assez stupide pour mettre un cast pour faire disparaitre un message d'erreur sans vraiment corriger l'erreur?" - Apparemment, tout le monde. -- Raymond Chen.

  3. #3
    Expert confirmé

    Inscrit en
    Août 2006
    Messages
    3 943
    Détails du profil
    Informations forums :
    Inscription : Août 2006
    Messages : 3 943
    Points : 5 655
    Points
    5 655
    Par défaut
    Moe,
    Citation Envoyé par pheapc Voir le message
    alors il me demande de vérifier le chemin de #include "CommonDet/BasicDet/interface/AlignmentPositionError.h" même si on est plus besoin de ce fichier ma question :est ce qu'il ya une FLAGS pour le réorienter
    Alors, il y a un problème de conception, puisque quelque part, tu as un include pour ce fichier, et que tu affirmes ne pas en avoir besoin.

    Il faut faire le ménage.
    Si les cons volaient, il ferait nuit à midi.

  4. #4
    Nouveau Candidat au Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2013
    Messages
    13
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Maroc

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Enseignement

    Informations forums :
    Inscription : Avril 2013
    Messages : 13
    Points : 1
    Points
    1
    Par défaut
    non tu n'as pas compris ma question ,vous pouvez voir en détails mon problème sur http://www.developpez.net/forums/d13...ique-so-linux/ merci

  5. #5
    Expert confirmé

    Inscrit en
    Août 2006
    Messages
    3 943
    Détails du profil
    Informations forums :
    Inscription : Août 2006
    Messages : 3 943
    Points : 5 655
    Points
    5 655
    Par défaut
    Hoe,

    Alors pourquoi ne pas avoir continué dans le même sujet,

    OU

    avoir mis le lien directement, avant qu'on te fasse remarquer que ...

    Si les cons volaient, il ferait nuit à midi.

Discussions similaires

  1. Réponses: 2
    Dernier message: 22/08/2012, 14h30
  2. Est ce que cela est possible ?
    Par dubidon dans le forum VB.NET
    Réponses: 13
    Dernier message: 21/06/2007, 17h13
  3. Tableau d' images, est-ce que c'est possible ?
    Par awane dans le forum WinDev
    Réponses: 8
    Dernier message: 27/11/2006, 20h10
  4. [AJAX] Est-ce que c'est possible ?
    Par jejeman dans le forum Général JavaScript
    Réponses: 4
    Dernier message: 09/11/2006, 16h50
  5. Est ce que c'est possible de télécharger ce forum génial ?
    Par dz_robotix dans le forum Evolutions du club
    Réponses: 2
    Dernier message: 11/09/2006, 15h12

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