Skip to content

Re: Cannot compile the examples using “make” with Cygwin (no object file)

OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB General Topics Cannot compile the examples using “make” with Cygwin (no object file) Re: Cannot compile the examples using “make” with Cygwin (no object file)

#2374
sam
Member

Hello, I am a newbie to OpenLb and to this forum. I even don’t know how to post my problem, can’t find any option! I am having similar error compiling the code. See below:rnrn


rn– Entering src/particles/boundaries (compile)rnmake[2]: Entering directory ‘/home/ShafiulMintu/olb-1.0r0/src/particles/boundaries’rnmake[2]: Nothing to be done for ‘compile’.rnmake[2]: Leaving directory ‘/home/ShafiulMintu/olb-1.0r0/src/particles/boundaries’rn– Leaving src/particles/boundaries (compile)rn


rn


rn– Entering src/utilities (compile)rnmake[2]: Entering directory ‘/home/ShafiulMintu/olb-1.0r0/src/utilities’rnCompile timer.cpprng++ -DOLB_PRECOMPILED -O3 -Wall -std=c++0x -I../../src -I../../src/ -I../../src/external -c timer.cpp -o ../../build/precompiled/obj/timer.ornIn file included from timer.cpp:25:0:rntimer.hh: In member function ‘void olb::util::Timer<T>::start()’:rntimer.hh:101:31: error: there are no arguments to ‘gettimeofday’ that depend on a template parameter, so a declaration of ‘gettimeofday’ must be available [-fpermissive]rn gettimeofday(&msTimeStart, 0); // time in msrn ^rntimer.hh:101:31: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)rntimer.hh:102:29: error: there are no arguments to ‘gettimeofday’ that depend on a template parameter, so a declaration of ‘gettimeofday’ must be available [-fpermissive]rn gettimeofday(&msTimeCur, 0); // time in ms, here only necessary for MLUP-calculationsrn ^rntimer.hh: In member function ‘void olb::util::Timer<T>::update(int)’:rntimer.hh:113:29: error: there are no arguments to ‘gettimeofday’ that depend on a template parameter, so a declaration of ‘gettimeofday’ must be available [-fpermissive]rn gettimeofday(&msTimeCur, 0); // time in msrn ^rntimer.hh: In member function ‘void olb::util::Timer<T>::stop()’:rntimer.hh:138:29: error: there are no arguments to ‘gettimeofday’ that depend on a template parameter, so a declaration of ‘gettimeofday’ must be available [-fpermissive]rn gettimeofday(&msTimeEnd, 0); // time in msrn ^rntimer.hh: In instantiation of ‘void olb::util::Timer<T>::start() [with T = double]’:rntimer.cpp:31:16: required from hererntimer.hh:101:15: error: ‘gettimeofday’ was not declared in this scopern gettimeofday(&msTimeStart, 0); // time in msrn ^rntimer.hh:102:15: error: ‘gettimeofday’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]rn gettimeofday(&msTimeCur, 0); // time in ms, here only necessary for MLUP-calculationsrn ^rntimer.hh:101:15: note: ‘gettimeofday’ declared here, later in the translation unitrn gettimeofday(&msTimeStart, 0); // time in msrn ^rntimer.hh: In instantiation of ‘void olb::util::Timer<T>::update(int) [with T = double]’:rntimer.cpp:31:16: required from hererntimer.hh:113:15: error: ‘gettimeofday’ was not declared in this scopern gettimeofday(&msTimeCur, 0); // time in msrn ^rntimer.hh: In instantiation of ‘void olb::util::Timer<T>::stop() [with T = double]’:rntimer.cpp:31:16: required from hererntimer.hh:138:15: error: ‘gettimeofday’ was not declared in this scopern gettimeofday(&msTimeEnd, 0); // time in msrn ^rnmake[2]: *** [Makefile:62: ../../build/precompiled/obj/timer.o] Error 1rnmake[2]: Leaving directory ‘/home/ShafiulMintu/olb-1.0r0/src/utilities’rn– Leaving src/utilities (compile)rn


rnmake[1]: Leaving directory ‘/home/ShafiulMintu/olb-1.0r0’rnLink aorta3drng++ aorta3d.o -L../../build/precompiled/lib -lolb -o aorta3drnaorta3d.o:aorta3d.cpp:(.text+0x147b): undefined reference to `olb::util::Timer<double>::update(int)’rnaorta3d.o:aorta3d.cpp:(.text+0x147b): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `olb::util::Timer<double>::update(int)’rnaorta3d.o:aorta3d.cpp:(.text+0x148a): undefined reference to `olb::util::Timer<double>::printStep(int)’rnaorta3d.o:aorta3d.cpp:(.text+0x148a): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `olb::util::Timer<double>::printStep(int)’rnaorta3d.o:aorta3d.cpp:(.text.startup+0x54e): undefined reference to `olb::util::Timer<double>::Timer(int, int, bool*, int)’rnaorta3d.o:aorta3d.cpp:(.text.startup+0x54e): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `olb::util::Timer<double>::Timer(int, int, bool*, int)’rnaorta3d.o:aorta3d.cpp:(.text.startup+0x556): undefined reference to `olb::util::Timer<double>::start()’rnaorta3d.o:aorta3d.cpp:(.text.startup+0x556): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `olb::util::Timer<double>::start()’rnaorta3d.o:aorta3d.cpp:(.text.startup+0x57e): undefined reference to `olb::util::Timer<double>::stop()’rnaorta3d.o:aorta3d.cpp:(.text.startup+0x57e): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `olb::util::Timer<double>::stop()’rnaorta3d.o:aorta3d.cpp:(.text.startup+0x586): undefined reference to `olb::util::Timer<double>::printSummary()’rnaorta3d.o:aorta3d.cpp:(.text.startup+0x586): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `olb::util::Timer<double>::printSummary()’rnaorta3d.o:aorta3d.cpp:(.text.startup+0x616): undefined reference to `olb::util::Timer<double>::Timer(int, int, bool*, int)’rnaorta3d.o:aorta3d.cpp:(.text.startup+0x616): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `olb::util::Timer<double>::Timer(int, int, bool*, int)’rnaorta3d.o:aorta3d.cpp:(.text.startup+0x61e): undefined reference to `olb::util::Timer<double>::start()’rnaorta3d.o:aorta3d.cpp:(.text.startup+0x61e): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `olb::util::Timer<double>::start()’rnaorta3d.o:aorta3d.cpp:(.text.startup+0x6fd): undefined reference to `olb::util::Timer<double>::stop()’rnaorta3d.o:aorta3d.cpp:(.text.startup+0x6fd): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `olb::util::Timer<double>::stop()’rnaorta3d.o:aorta3d.cpp:(.text.startup+0x705): undefined reference to `olb::util::Timer<double>::printSummary()’rnaorta3d.o:aorta3d.cpp:(.text.startup+0x705): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `olb::util::Timer<double>::printSummary()’rncollect2: error: ld returned 1 exit statusrnmake: *** [Makefile:103: aorta3d] Error 1rnrnAny idea what I am missing? Would highly appreicaite any help.rnrnThanks.