साथld: प्रतीक को अपरिभाषित संदर्भ 'log2 @@ GLIBC_2.2.5'
for (level = 1; level <= log2((double)size); level++)
^
अपने log2()
का उपयोग कर, लेकिन क्या गलत से की तरह लगता है क्या गलत? मैं इसे ओपनएमपीआई कोड के साथ वास्तव में उपयोग कर रहा हूं, लेकिन इस पंक्ति पर टिप्पणी करने से चीजें ठीक हो जाती हैं।
Full Source (http://pastie.org/7559178) देखने लाइन 40
[[email protected] Assign3]$ mpicc -o cpi cpi.c && mpirun -np 16 cpi
/usr/bin/ld: /tmp/cca9x4he.o: undefined reference to symbol '[email protected]@GLIBC_2.2.5'
/usr/bin/ld: note: '[email protected]@GLIBC_2.2.5' is defined in DSO /usr/lib/libm.so.6 so try adding it to the linker command line
/usr/lib/libm.so.6: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
लगता log2(4)
की तरह काम करेगा, लेकिन मैं एक चर में पारित नहीं कर सकते?
धन्यवाद, मैं है तय है कि –