[Risolto] [C++] error: gsl/gsl_rng.h: No such file or directory
Inviato: lunedì 15 settembre 2008, 12:23
ciao a tutti,
in questo periodo devo lavorare con un simulatore interamente scritto in C++ che serve a simulare i sistemi per il P2P Streaming.
(lo trovate qui: http://netgroup.uniroma2.it/twiki/bin/v ... latorGuide
e lo scaricate così se vi interessa: svn checkout https://minerva.netgroup.uniroma2.it/sv ... runk/ )
Praticamente ci sono degli esempi già fatti dentro la cartella algorithms e io volevo usarne uno per prendere dimestichezza col simulatore. In pratica mi hanno spiegato che digitare all'interno della cartella /trunk (che contiene i files del simulatore) il comando "make" o "make -f debug". Quindi apro il terminale, digito il comando e quello che viene fuori è questo:
andrea@andrea-desktop:~/trunk$ make
rm -f main.o overlay/BaseNode.o engine/BaseEvent.o overlay/PartnerInfo.o algorithms/fib_nochurn/customize/Events.o engine/Calendar.o user/BaseUser.o algorithms/fib_nochurn/customize/User.o algorithms/fib_nochurn/customize/Node.o overlay/Chunk.o engine/Tracer.o net/BWRel.o net/BWNbasic.o net/BWNrelmng.o clean opss
g++ -O3 -D_FILE_OFFSET_BITS=64 -I. -Ialgorithms/fib_nochurn -I/usr/local/include -c -o main.o main.cpp
In file included from ./overlay/BaseNode.h:11,
from ./engine/BaseEvent.h:6,
from algorithms/fib_nochurn/customize/Events.h:4,
from engine/Calendar.h:5,
from main.cpp:3:
./overlay/PartnerInfo.h:11:25: error: gsl/gsl_rng.h: No such file or directory
./overlay/PartnerInfo.h:12:29: error: gsl/gsl_randist.h: No such file or directory
In file included from ./overlay/BaseNode.h:11,
from ./engine/BaseEvent.h:6,
from algorithms/fib_nochurn/customize/Events.h:4,
from engine/Calendar.h:5,
from main.cpp:3:
./overlay/PartnerInfo.h:106: error: ISO C++ forbids declaration of ‘gsl_rng_type’ with no type
./overlay/PartnerInfo.h:106: error: expected ‘;’ before ‘*’ token
./overlay/PartnerInfo.h:107: error: ISO C++ forbids declaration of ‘gsl_rng’ with no type
./overlay/PartnerInfo.h:107: error: expected ‘;’ before ‘*’ token
make: *** [main.o] Error 1
mi pare di aver capito che il problema potrebbe essere che mancano questi file header gsl_rng.h e gsl_randist.h.
Come si fa a risolvere questo problema? Bisogna installare questi file nel compilatore g++ (che non avevo e che ho scaricato facendo "sudo etc etc")? O che altro? ???
Ciao e grazie
in questo periodo devo lavorare con un simulatore interamente scritto in C++ che serve a simulare i sistemi per il P2P Streaming.
(lo trovate qui: http://netgroup.uniroma2.it/twiki/bin/v ... latorGuide
e lo scaricate così se vi interessa: svn checkout https://minerva.netgroup.uniroma2.it/sv ... runk/ )
Praticamente ci sono degli esempi già fatti dentro la cartella algorithms e io volevo usarne uno per prendere dimestichezza col simulatore. In pratica mi hanno spiegato che digitare all'interno della cartella /trunk (che contiene i files del simulatore) il comando "make" o "make -f debug". Quindi apro il terminale, digito il comando e quello che viene fuori è questo:
andrea@andrea-desktop:~/trunk$ make
rm -f main.o overlay/BaseNode.o engine/BaseEvent.o overlay/PartnerInfo.o algorithms/fib_nochurn/customize/Events.o engine/Calendar.o user/BaseUser.o algorithms/fib_nochurn/customize/User.o algorithms/fib_nochurn/customize/Node.o overlay/Chunk.o engine/Tracer.o net/BWRel.o net/BWNbasic.o net/BWNrelmng.o clean opss
g++ -O3 -D_FILE_OFFSET_BITS=64 -I. -Ialgorithms/fib_nochurn -I/usr/local/include -c -o main.o main.cpp
In file included from ./overlay/BaseNode.h:11,
from ./engine/BaseEvent.h:6,
from algorithms/fib_nochurn/customize/Events.h:4,
from engine/Calendar.h:5,
from main.cpp:3:
./overlay/PartnerInfo.h:11:25: error: gsl/gsl_rng.h: No such file or directory
./overlay/PartnerInfo.h:12:29: error: gsl/gsl_randist.h: No such file or directory
In file included from ./overlay/BaseNode.h:11,
from ./engine/BaseEvent.h:6,
from algorithms/fib_nochurn/customize/Events.h:4,
from engine/Calendar.h:5,
from main.cpp:3:
./overlay/PartnerInfo.h:106: error: ISO C++ forbids declaration of ‘gsl_rng_type’ with no type
./overlay/PartnerInfo.h:106: error: expected ‘;’ before ‘*’ token
./overlay/PartnerInfo.h:107: error: ISO C++ forbids declaration of ‘gsl_rng’ with no type
./overlay/PartnerInfo.h:107: error: expected ‘;’ before ‘*’ token
make: *** [main.o] Error 1
mi pare di aver capito che il problema potrebbe essere che mancano questi file header gsl_rng.h e gsl_randist.h.
Come si fa a risolvere questo problema? Bisogna installare questi file nel compilatore g++ (che non avevo e che ho scaricato facendo "sudo etc etc")? O che altro? ???
Ciao e grazie