Bonjour,

J'ai fait un programme qui compile très bien avec gcc 4.4.7. Sauf que j'ai besoin que celui-ci compile également avec gcc 2.96. Et ça ne fonctionne pas malheureusement.

Voilà les erreurs générées :

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
 
g++ -pthread -lrt  -g -static -W -Wall -ansi -pedantic    -c -o automatique.o automatique.cpp
In file included from destinataire.h:24,
                 from automatique.cpp:22:
enum.h:112: field `random_buffer' has incomplete type
enum.h:115: warning: malformed `#pragma pack'
enum.h:115: warning: ignoring pragma: 
enum.h:137: warning: malformed `#pragma pack'
enum.h:137: warning: ignoring pragma: 
enum.h:155: warning: malformed `#pragma pack'
enum.h:155: warning: ignoring pragma: 
enum.h:171: warning: malformed `#pragma pack'
enum.h:171: warning: ignoring pragma: 
automatique.cpp: In function `void Automatique::automatique (int, char 
**)':
automatique.cpp:196: aggregate `DRAND48_DATA randBuffer_mono' has 
incomplete type and cannot be initialized
automatique.cpp:197: `sizeof' applied to incomplete type `DRAND48_DATA'
automatique.cpp:198: `srand48_r' undeclared (first use this function)
automatique.cpp:198: (Each undeclared identifier is reported only once 
for each function it appears in.)
automatique.cpp:222: `struct Infos' has no member named `random_buffer'
automatique.cpp:348: invalid use of undefined type `struct 
DRAND48_DATA'
enum.h:112: forward declaration of `struct 
DRAND48_DATA'
automatique.cpp:364: invalid use of undefined type `struct 
drand48_data'
enum.h:112: forward declaration of `struct 
drand48_data'
automatique.cpp:365: `struct Infos' has no member named `random_buffer'
automatique.cpp:365: invalid use of undefined type `struct 
drand48_data'
enum.h:112: forward declaration of `struct 
drand48_data'
automatique.cpp:426: invalid use of undefined type `struct 
drand48_data'
enum.h:112: forward declaration of `struct 
drand48_data'
make: *** [automatique.o] Erreur 1
Ainsi les coupables #pragma pack et struct drand48_data ne semblent pas être supportés par la version 2.96 de gcc.

Quelqu'un aurait-il donc une suggestion pour contourner ce problème ?

Merci