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

Autres éditeurs Discussion :

Problème de compilation (parse error before '*' token)


Sujet :

Autres éditeurs

  1. #1
    Membre confirmé
    Profil pro
    Inscrit en
    Mai 2006
    Messages
    233
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2006
    Messages : 233
    Par défaut Problème de compilation (parse error before '*' token)
    bounjour,

    j'ai un probleme lord de l'edition de liens, le message d'erreur est :
    parse error before '*' token

    dans un fichier .h, qui a était fourni!!!!!!!

    merci pour votre aide

  2. #2
    Membre chevronné Avatar de Mayti4
    Inscrit en
    Février 2004
    Messages
    442
    Détails du profil
    Informations forums :
    Inscription : Février 2004
    Messages : 442
    Par défaut
    Plutôt lors de la compilation.

    Montre ton fichier .h.

  3. #3
    Membre confirmé
    Profil pro
    Inscrit en
    Mai 2006
    Messages
    233
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2006
    Messages : 233
    Par défaut
    voila le .h
    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
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
     
    #ifndef SAISIE_H
    #define SAISIE_H
     
    /*   definition des touches */
    #define TC_SK1		    0x20 
    #define TC_SK2		    0x21   
    #define TC_SK3		    0x22   
    #define TC_SK4		    0x23   
    #define TC_FONCTION	    0x24   
    #define TC_ANNULATION	0x25 
    #define TC_CORRECTION	0x26   
    #define TC_VALIDATION	0x27   
    #define TC_POINT	    0x28   
    #define TC_SKHAUT	    0x29
    #define TC_SKBAS	    0x30
     
     
    /* comptes rendus de saisie */
     
    #define CR_SAISIE_OK		    0
    #define CR_SAISIE_NOK	    	1
    #define CR_SAISIE_ANNUL		    2	
    #define CR_SAISIE_TIME_OUT	    3
    #define CR_SAISIE_FCT 		    4
    #define CR_SAISIE_EN_COURS      5
    #define CR_SAISIE_VAL           6
    #define CR_SAISIE_ARRET         7
    #define CR_SAISIE_SK1    		8
    #define CR_SAISIE_SK2    		9
    #define CR_SAISIE_SK3    		10
    #define CR_SAISIE_SK4    		11
    #define CR_SAISIE_HAUT   		12
    #define CR_SAISIE_BAS    		13
     
    /*  definitions de valeurs courantes des parametres*/
     
    #define MINUTE  	60
    #define NO_TIME_OUT	0    
    #define NO_ECHO		0
    #define ECHO_NORMAL	1    
    #define ECHO_SPECIAL	2    
    #define TAB_STANDARD    0
     
    #define CAR_SECRET      '*'
    #define ELVEC(x)       (sizeof(x) / sizeof(x[0]))
     
    /*  definitions de types  */
     
    /* format de la table en entree pour SAISIE numerique */ 
    typedef struct {
                    word mask;
    		byte time_out ;
    		byte line;
    		byte column;
    		byte echo;
    		byte nb_max;
    		byte nb_min;
    		 } TAB_ENTRY_STRING ;
     
     
    /* format de la table en entree pour NAVIGATION */ 
    typedef int (*PFONCNAVI) (void);
    typedef struct
    {
      int         itemlabel;
      PFONCNAVI   function;
    } NavigationListe;
     
     
    /* format de la table en entree pour NAVIGATION */ 
     
    typedef struct
    {
      char        *itemlabel;
      char        *shortcommand;
      char         level;
      PFONCNAVI    function;
    } NavigationItems;
     
     
    /* format de la table en entree pour SAISIE liste graphique */ 
    typedef int (*CTRL) (void);
    #define NB_ELT_LISTE 20
    typedef struct
    {
    	int            left;         /* */
    	int            top;          /* */
    	int            rigth;        /* */
    	int            bottom;       /* */
    	int            nblines;      /* */
    	int            fontsize;     /* */
    	int            type;         /* */
    	int            police;       /* */
    	int            correct;      /* */
    	int            offset;       /* */
    	int            shortcommand; /* */
    	int            selected;     /* */
    	int            thickness;    /* */
    	int            border;       /* */
    	int            popup;        /* */
    	int            first;        /* */
    	int            current;      /* */
    	int            time_out;     /* */
    	unsigned char *titre;        /* */
    } StructFenetre;
     
    typedef struct
    {
        StructFenetre  Fenetre;                /* */
    	unsigned char *tab[NB_ELT_LISTE];      /* */
    } StructListe;
     
    /* format de la table en entree pour SAISIE alphanumerique */ 
    typedef struct {
                    word mask;
    		byte time_out ;
    		byte line;
    		byte column;
    		byte echo;
    		byte nb_max;
    		byte nb_min;
                    byte *tab_caracteres;
    		 } TAB_ENTRY_ALPHA ;
     
     
    /* format de la table en entree pour SAISIE des touches fonctions */ 
    typedef struct {
    		word mask;
    		byte time_out; } TAB_ENTRY_FCT ;
     
     
    /* format de la table en entree pour SAISIE du montant */ 
    typedef struct {
    		word mask;
    		byte time_out; } TAB_ENTRY_AMOUNT ;
     
     
    /* format de la table en retour des saisies */ 
    typedef struct {
    		byte nombre;
    		byte donnees [50]; } BUFFER_SAISIE ;
     
     
    /* entry return codes */
     
    #define CR_ENTRY_OK				0
    #define CR_ENTRY_NOK		    1
    #define CR_ENTRY_CANCEL		    2	
    #define CR_ENTRY_TIME_OUT	    3
    #define CR_ENTRY_FCT 		    4
    #define CR_ENTRY_IN_PROGRESS   	5
    #define CR_ENTRY_VALIDATED    	6
    #define CR_ENTRY_BREAK         	7
    #define CR_ENTRY_SK1    		8
    #define CR_ENTRY_SK2    		9
    #define CR_ENTRY_SK3    		10
    #define CR_ENTRY_SK4    		11
     
    #define ITEMS_LIST_NUMBER 20
    typedef struct
    {
    	int            left;         /* in pixels */
    	int            top;          /* in pixels */
    	int            rigth;        /* in pixels */
    	int            bottom;       /* in pixels */
    	int            nblines;      /* window lines number */
    	int            fontsize;     /* Font size _SMALL_ or _MEDIUM_ or _LARGE_ */
    	int            type;         /* Font type _PROPORTIONNEL_ or _NORMALE_ */
    	int            font;         /* should be 0 */
    	int            correct;      /* process correction key ? _ON_ or _OFF_ */
    	int            offset;       /* table index for selection */
    	int            shortcommand; /* shortcut ? _ON_ or _OFF_ */
    	int            selected;     /* display a predefined item */
    	int            thickness;    /* window border thickness */
    	int            border;       /* border ? _ON_ or _OFF_ */
    	int            popup;        /* save and restore screen ? _ON_ or _OFF_ */
    	int            first;        /* first item of the list */
    	int            current;      /* pre selected item if selected is _ON_ */
    	int            time_out;     /* time out in seconds */
    	unsigned char  *title;       /* NULL no title */
    } StructWindow;
     
    typedef struct
    {
        	StructWindow  MyWindow;
    	unsigned char *tab[ITEMS_LIST_NUMBER];      /* item list NULL terminated  */
    } StructList;
     
    typedef struct {
    		byte d_len;	// data length 
    		byte d_entry [50]; } ENTRY_BUFFER;
     
    typedef void (*PFONCSUP) (void);
    typedef struct
    {
       char     *Name;
       PFONCSUP fonc;
    } FCT_SUP;
     
     
    extern void          G_Saisie_Liste(StructListe *table);
    extern void          G_Saisie_Numerique(StructListe *menu,TAB_ENTRY_STRING *table);
    extern void          G_Saisie_Alphanumerique(StructListe *menu,TAB_ENTRY_ALPHA *table);
    extern void          G_Saisie_Fonction(StructListe *menu,TAB_ENTRY_STRING *table);
    extern void          Saisie_Fonction(TAB_ENTRY_FCT *table);
    extern void          Saisie_Numerique(TAB_ENTRY_STRING *table);
    extern void          Saisie_Alphanumerique(TAB_ENTRY_ALPHA *table);
    extern void          Saisie_Montant (TAB_ENTRY_AMOUNT *table);
    extern void          Saisie_Seuil (TAB_ENTRY_AMOUNT *table);
    extern void          Stop_Saisie (void);
    extern unsigned char Read_Saisie ( BUFFER_SAISIE * );
    extern unsigned char SaisieOperation(unsigned short timeout,unsigned char no_appli,int *No,int Nb,NavigationItems *Table);
    extern void          InitDLLSaisie(void);
    extern void          InitSysSaisie(void);
    extern void          SLSQ_Affichage_choix (FILE *fd, char **table, unsigned char *nb, unsigned char *debut, unsigned char *indice, unsigned char *cr);
    extern void          G_Aff_Liste_Ppr(StructListe *table);
    extern void          G_Init(StructListe *Menu,unsigned char line,unsigned char column);
    extern void          G_Saisie_Etendue(StructListe *menu,TAB_ENTRY_STRING *table);
     
     
    #define G_Extended_entry(p0,p1)       G_Saisie_Etendue((StructListe *)p0,(TAB_ENTRY_STRING *)p1);
    #define G_List_Entry(p0)              G_Saisie_Liste( (StructListe * )p0)
    #define G_Numerical_Entry(p0,p1)      G_Saisie_Numerique((StructListe *)p0,(TAB_ENTRY_STRING *)p1)
    #define G_Alphanumerical_Entry(p0,p1) G_Saisie_Alphanumerique((StructListe *)p0,(TAB_ENTRY_ALPHA *)p1)
    #define Numerical_Entry(p0)           Saisie_Numerique(p0,(TAB_ENTRY_STRING *)p0)
    #define Alphanumerical_Entry(p0)      Saisie_Alphanumerique((TAB_ENTRY_ALPHA *)p0)
    #define Fct_Entry(p0)                 Saisie_Fonction((TAB_ENTRY_FCT *)p0)
    #define Stop_Entry                    Stop_Saisie
    #define Navigate                      SaisieOperation
    #define Get_Entry(p0)                 Read_Saisie ((BUFFER_SAISIE *)p0)
    #define entrylib_open                 saisielib_open
     
     
    #endif

  4. #4
    Rédacteur
    Avatar de Laurent Gomila
    Profil pro
    Développeur informatique
    Inscrit en
    Avril 2003
    Messages
    10 651
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France, Moselle (Lorraine)

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Avril 2003
    Messages : 10 651
    Par défaut
    On peut au moins savoir sur quelle ligne se produit l'erreur ? ...

    A part ça, je ne vois pas un seul bout de C++ dans ce code. Ce ne serait pas du C par hasard ?

  5. #5
    Membre confirmé
    Profil pro
    Inscrit en
    Mai 2006
    Messages
    233
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2006
    Messages : 233
    Par défaut
    les message d'erreur son les suivants:
    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
     
    In file included from main.c:3:
    saisie.h:78: error: parse error before "word"
    saisie.h:78: warning: no semicolon at end of struct or union
    saisie.h:79: warning: type defaults to `int' in declaration of `time_out'
    saisie.h:79: warning: data definition has no type or storage class
    saisie.h:80: error: parse error before "line"
    saisie.h:80: warning: type defaults to `int' in declaration of `line'
    saisie.h:80: warning: data definition has no type or storage class
    saisie.h:81: error: parse error before "column"
    saisie.h:81: warning: type defaults to `int' in declaration of `column'
    saisie.h:81: warning: data definition has no type or storage class
    saisie.h:82: error: parse error before "echo"
    saisie.h:82: warning: type defaults to `int' in declaration of `echo'
    saisie.h:82: warning: data definition has no type or storage class
    saisie.h:83: error: parse error before "nb_max"
    saisie.h:83: warning: type defaults to `int' in declaration of `nb_max'
    saisie.h:83: warning: data definition has no type or storage class
    saisie.h:84: error: parse error before "nb_min"
    saisie.h:84: warning: type defaults to `int' in declaration of `nb_min'
    saisie.h:84: warning: data definition has no type or storage class
    saisie.h:85: warning: type defaults to `int' in declaration of `TAB_ENTRY_STRING'
    saisie.h:85: warning: data definition has no type or storage class
    saisie.h:142: error: parse error before "word"
    saisie.h:142: warning: no semicolon at end of struct or union
    saisie.h:143: warning: type defaults to `int' in declaration of `time_out'
    saisie.h:143: warning: data definition has no type or storage class
    saisie.h:144: error: parse error before "line"
    saisie.h:144: warning: type defaults to `int' in declaration of `line'
    saisie.h:144: warning: data definition has no type or storage class
    saisie.h:145: error: parse error before "column"
    saisie.h:145: warning: type defaults to `int' in declaration of `column'
    saisie.h:145: warning: data definition has no type or storage class
    saisie.h:146: error: parse error before "echo"
    saisie.h:146: warning: type defaults to `int' in declaration of `echo'
    saisie.h:146: warning: data definition has no type or storage class
    saisie.h:147: error: parse error before "nb_max"
    saisie.h:147: warning: type defaults to `int' in declaration of `nb_max'
    saisie.h:147: warning: data definition has no type or storage class
    saisie.h:148: error: parse error before "nb_min"
    saisie.h:148: warning: type defaults to `int' in declaration of `nb_min'
    saisie.h:148: warning: data definition has no type or storage class
    saisie.h:149: error: parse error before '*' token
    saisie.h:149: warning: type defaults to `int' in declaration of `tab_caracteres'
    saisie.h:149: warning: data definition has no type or storage class
    saisie.h:150: error: parse error before '}' token
    saisie.h:150: warning: type defaults to `int' in declaration of `TAB_ENTRY_ALPHA'
    saisie.h:150: warning: data definition has no type or storage class
    saisie.h:155: error: parse error before "word"
    saisie.h:155: warning: no semicolon at end of struct or union
    saisie.h:156: warning: type defaults to `int' in declaration of `time_out'
    saisie.h:156: warning: data definition has no type or storage class
    saisie.h:156: warning: type defaults to `int' in declaration of `TAB_ENTRY_FCT'
    saisie.h:156: warning: data definition has no type or storage class
    saisie.h:161: error: parse error before "word"
    saisie.h:161: warning: no semicolon at end of struct or union
    saisie.h:162: warning: type defaults to `int' in declaration of `time_out'
    saisie.h:162: warning: data definition has no type or storage class
    saisie.h:162: warning: type defaults to `int' in declaration of `TAB_ENTRY_AMOUNT'
    saisie.h:162: warning: data definition has no type or storage class
    saisie.h:167: error: parse error before "byte"
    saisie.h:167: warning: no semicolon at end of struct or union
    saisie.h:168: warning: type defaults to `int' in declaration of `donnees'
    saisie.h:168: warning: data definition has no type or storage class
    saisie.h:168: error: parse error before '}' token
    saisie.h:168: warning: type defaults to `int' in declaration of `BUFFER_SAISIE'
    saisie.h:168: warning: data definition has no type or storage class
    saisie.h:217: error: parse error before "byte"
    saisie.h:217: warning: no semicolon at end of struct or union
    saisie.h:218: warning: type defaults to `int' in declaration of `d_entry'
    saisie.h:218: warning: data definition has no type or storage class
    saisie.h:218: error: parse error before '}' token
    saisie.h:218: warning: type defaults to `int' in declaration of `ENTRY_BUFFER'
    saisie.h:218: warning: data definition has no type or storage class
    saisie.h:229: error: parse error before "TAB_ENTRY_STRING"
    saisie.h:230: error: parse error before "TAB_ENTRY_ALPHA"
    saisie.h:231: error: parse error before "TAB_ENTRY_STRING"
    saisie.h:232: error: parse error before '*' token
    saisie.h:233: error: parse error before '*' token
    saisie.h:234: error: parse error before '*' token
    saisie.h:235: error: parse error before '*' token
    saisie.h:236: error: parse error before '*' token
    saisie.h:238: error: parse error before '*' token
    saisie.h:245: error: parse error before "TAB_ENTRY_STRING"
    make: *** [main.o] Error 1

  6. #6
    Membre chevronné Avatar de Mayti4
    Inscrit en
    Février 2004
    Messages
    442
    Détails du profil
    Informations forums :
    Inscription : Février 2004
    Messages : 442
    Par défaut
    typedef struct
    {
    word mask;
    byte time_out ;
    byte line;
    byte column;
    byte echo;
    byte nb_max;
    byte nb_min;
    } TAB_ENTRY_STRING ;
    word et byte sont déclarer ?

  7. #7
    Membre confirmé
    Profil pro
    Inscrit en
    Mai 2006
    Messages
    233
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2006
    Messages : 233
    Par défaut
    ce sont des fonctions prédifinies , APIs fourni avec un environnement!!!

  8. #8
    Membre averti
    Profil pro
    Inscrit en
    Novembre 2005
    Messages
    44
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2005
    Messages : 44
    Par défaut
    (? environnement ?)

    Il semble que l'auteur a oublié un #include dans son .h car je ne voit pas les definitions de word et byte.

    ++

  9. #9
    Membre confirmé
    Profil pro
    Inscrit en
    Mai 2006
    Messages
    233
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2006
    Messages : 233
    Par défaut
    ça métonnerai!! parce qu'il existe tte une application basée sur cet API, qui es fourni par le constructeur de ma machine cible

Discussions similaires

  1. "syntax error before '(' token " .. oO
    Par jbarreau-mainson dans le forum C
    Réponses: 3
    Dernier message: 08/04/2009, 11h21
  2. Parse error before "socklen_t" sous NIOS IDE
    Par plagia dans le forum Réseau
    Réponses: 1
    Dernier message: 22/07/2008, 16h58
  3. error: parse error before "FILE"
    Par v4np13 dans le forum C
    Réponses: 4
    Dernier message: 20/12/2006, 18h01
  4. syntax error before '!' token
    Par titmael dans le forum C
    Réponses: 18
    Dernier message: 10/11/2006, 23h07
  5. parse error before "__usLgEmissMessage"
    Par moon93 dans le forum C
    Réponses: 4
    Dernier message: 01/08/2006, 16h20

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