Seryoga
26th March 2014, 15:48
Hey guys i am new here.
Have the following problem with compiling my code
I get after starting make sim_O following errors
Classic_observables.o: In function `main':
/home/sergej/Arbeitsfläche/Code/Classic_observables.cpp:75: undefined reference to `fftw_plan_dft_3d'
/home/sergej/Arbeitsfläche/Code/Classic_observables.cpp:76: undefined reference to `fftw_plan_dft_3d'
/home/sergej/Arbeitsfläche/Code/Classic_observables.cpp:384: undefined reference to `fftw_destroy_plan'
/home/sergej/Arbeitsfläche/Code/Classic_observables.cpp:384: undefined reference to `fftw_destroy_plan'
/home/sergej/Arbeitsfläche/Code/Classic_observables.cpp:385: undefined reference to `fftw_cleanup'
Classic_observables.o: In function `fftw_norm(fftw_plan_s*, gsl_complex*, gsl_complex*, double)':
/home/sergej/Arbeitsfläche/Code/ComplexGrid.h:32: undefined reference to `fftw_execute_dft'
ItGPE.o: In function `fftw_not_norm(fftw_plan_s*, gsl_complex*, gsl_complex*, double)':
/home/sergej/Arbeitsfläche/Code/ComplexGrid.h:48: undefined reference to `fftw_execute_dft'
collect2: ld gab 1 als Ende-Status zurück
make: *** [sim_O] Fehler 1
However i already installes fftw3 and included it into the makefile (you can look at the code) :
CC= g++
EXTROOT= /home/sergej/Downloads/hdf5-1.8.12/hdf5
EXTLIB= -L$(EXTROOT)/lib
INCLUDE= -I$(EXTROOT)/include
CFLAGS= -Wl,--no-as-needed -g -Wall -lgsl -lgslcblas -fopenmp -lfftw3 -lm -lfftw3_omp $(EXTLIB) -lhdf5
LDFLAGS= -Wl,-rpath,/home/sergej/Downloads/hdf5-1.8.12/hdf5/lib
OBJECTS_OBSER= Classic_observables.o kPropagator.o Initial.o ItGPE.o sGPE.o Noise.o BdG_QC.o Soliton.o GPE.o Observables.o
OBJECTS_FIELD= Classic_fields.o kPropagator.o Initial.o ItGPE.o sGPE.o Noise.o BdG_QC.o Soliton.o GPE.o
# Runge_Kutta.o
#Calculate observables in C/C++, don't save fields
sim_O : $(OBJECTS_OBSER)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
#Calculate observables extern, just save fields
sim_F : $(OBJECTS_FIELD)
$(CC) $(CFLAGS) -o $@ $^
%.o : %.cpp *.h
$(CC) $(CFLAGS) $(INCLUDE) -c $<
clean :
-rm -f *.o *~
cleanall:
-rm -f *.o *~ sim_O sim_F
cleandata:
-rm -f ./data/*.*
-rm -f ./data/tmp/*.*
This shoul actually do the job
Fftw ist installed by default in my /usr/local folder
So does anybody have any suggestions ?
(i am quite new to programming so sry if my mistakes are too obviuos or something else )
Have the following problem with compiling my code
I get after starting make sim_O following errors
Classic_observables.o: In function `main':
/home/sergej/Arbeitsfläche/Code/Classic_observables.cpp:75: undefined reference to `fftw_plan_dft_3d'
/home/sergej/Arbeitsfläche/Code/Classic_observables.cpp:76: undefined reference to `fftw_plan_dft_3d'
/home/sergej/Arbeitsfläche/Code/Classic_observables.cpp:384: undefined reference to `fftw_destroy_plan'
/home/sergej/Arbeitsfläche/Code/Classic_observables.cpp:384: undefined reference to `fftw_destroy_plan'
/home/sergej/Arbeitsfläche/Code/Classic_observables.cpp:385: undefined reference to `fftw_cleanup'
Classic_observables.o: In function `fftw_norm(fftw_plan_s*, gsl_complex*, gsl_complex*, double)':
/home/sergej/Arbeitsfläche/Code/ComplexGrid.h:32: undefined reference to `fftw_execute_dft'
ItGPE.o: In function `fftw_not_norm(fftw_plan_s*, gsl_complex*, gsl_complex*, double)':
/home/sergej/Arbeitsfläche/Code/ComplexGrid.h:48: undefined reference to `fftw_execute_dft'
collect2: ld gab 1 als Ende-Status zurück
make: *** [sim_O] Fehler 1
However i already installes fftw3 and included it into the makefile (you can look at the code) :
CC= g++
EXTROOT= /home/sergej/Downloads/hdf5-1.8.12/hdf5
EXTLIB= -L$(EXTROOT)/lib
INCLUDE= -I$(EXTROOT)/include
CFLAGS= -Wl,--no-as-needed -g -Wall -lgsl -lgslcblas -fopenmp -lfftw3 -lm -lfftw3_omp $(EXTLIB) -lhdf5
LDFLAGS= -Wl,-rpath,/home/sergej/Downloads/hdf5-1.8.12/hdf5/lib
OBJECTS_OBSER= Classic_observables.o kPropagator.o Initial.o ItGPE.o sGPE.o Noise.o BdG_QC.o Soliton.o GPE.o Observables.o
OBJECTS_FIELD= Classic_fields.o kPropagator.o Initial.o ItGPE.o sGPE.o Noise.o BdG_QC.o Soliton.o GPE.o
# Runge_Kutta.o
#Calculate observables in C/C++, don't save fields
sim_O : $(OBJECTS_OBSER)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
#Calculate observables extern, just save fields
sim_F : $(OBJECTS_FIELD)
$(CC) $(CFLAGS) -o $@ $^
%.o : %.cpp *.h
$(CC) $(CFLAGS) $(INCLUDE) -c $<
clean :
-rm -f *.o *~
cleanall:
-rm -f *.o *~ sim_O sim_F
cleandata:
-rm -f ./data/*.*
-rm -f ./data/tmp/*.*
This shoul actually do the job
Fftw ist installed by default in my /usr/local folder
So does anybody have any suggestions ?
(i am quite new to programming so sry if my mistakes are too obviuos or something else )