Bonjour,
Depuis quelques temps je n'arrive plus à linker la librairie gsl. J'ai essayé de la réinstaller plusieurs fois et de différentes manières mais rien n'y fait (archive du site gnu, homebrew etc.). Pourtant tout marchait nickel avant. Quelqu'un pourrai m'aider à y voir plus clair? Je vous met mon Makefile et ce que me retourne le terminal. Merci.
##############################
# Makefile du TP Projet
##############################
#Chemin pour utiliser Vecteur.o
VECTEUR=./Vecteur
OBJECTS = main.o EDO2.o $(VECTEUR)/Vecteur.o
all: main
COMPILCOMMAND=g++ -std=c++11 -I$(VECTEUR) -c -o $@ $<
# Commande generique
%.o: %.cpp %.h
$(COMPILCOMMAND)
#commande pour l’executable
%.o: %.cpp
$(COMPILCOMMAND)
# Fichiers source a generer
EDO2.o: EDO2.h
main.o: EDO2.h
# Creation de l'executable
main: $(OBJECTS)
g++ -std=c++11 -o main $(OBJECTS) -lgsl -lgslcblas
# Nettoyage des data
cleandata:
rm -f *.dat ./Resultats/*.dat
clean:
rm -f *.o main *.dat *~ ./Resultats/*.dat ./Vecteur/*.o
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13 MacBook-Pro-de-Jeremy-2:Code Projet jeremymartinon$ make g++ -std=c++11 -I./Vecteur -c -o main.o main.cpp In file included from main.cpp:4: In file included from ./EDO2.h:3: ./Vecteur/Vecteur.h:8:10: fatal error: 'gsl/gsl_vector.h' file not found #include <gsl/gsl_vector.h> ^ 1 error generated. make: *** [main.o] Error 1 MacBook-Pro-de-Jeremy-2:Code Projet jeremymartinon$ locate gsl_vector.h /opt/local/include/gsl/gsl_vector.h /usr/local/Cellar/gsl/1.16/include/gsl/gsl_vector.h MacBook-Pro-de-Jeremy-2:Code Projet jeremymartinon$
Partager