I'm sure i'm doing something really basic and stupid here, but i can't seem to use pow() from math.h ???

ben:1$ cat test_pow.c
#include <math.h>

int main()
{
  double temp;

  temp = pow( 2.0, 3.0 );
  return 1;
}
ben:2$ cc test_pow.c
/tmp//ccy24322.o(.text+0x31): In function `main':
: undefined reference to `pow'
collect2: ld returned 1 exit status
ben:3$

this is an i386, running the snapshot from earlier today.

OpenBSD 4.3-current (GENERIC) #853: Fri May  2 04:37:23 MDT 2008
    [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz ("GenuineIntel" 686- class) 2 GHz cpu0: FPU,PSE,TSC,MSR,MCE,CX8,SEP,MTRR,PGE,CMOV,MMX,FXSR,SSE,SSE2,SS,SSE3
real mem  = 536440832 (511MB)
avail mem = 510615552 (486MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 12/27/07, BIOS32 rev. 0 @ 0xf9000, SMBIOS rev. 2.3 @ 0xff01f (19 entries) bios0: vendor Parallels Software International Inc. version "3.0" date 16/01/2008
bios0: Parallels Software International Inc. Parallels Virtual Platform
acpi at bios0 function 0x0 not configured
pcibios0 at bios0: rev 2.1 @ 0xf0000/0x10000
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xf2000/144 (7 entries)
pcibios0: PCI Exclusive IRQs: 3 4 5 7 9 10 11 12
pcibios0: PCI Interrupt Router at 000:31:0 ("Intel 82801BA LPC" rev 0x00)
pcibios0: PCI bus #0 is the last bus
bios0: ROM list: 0xc0000/0xa000!
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
vga1 at pci0 dev 2 function 0 unknown vendor 0x1ab8 product 0x1131 rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
unknown vendor 0x1ab8 product 0x1112 (class bridge subclass miscellaneous, rev 0x00) at pci0 dev 3 function 0 not configured ne3 at pci0 dev 5 function 0 "Realtek 8029" rev 0x00: irq 10, address 00:1c:42:2d:c0:a9
pchb0 at pci0 dev 30 function 0 "Intel 82815 Host" rev 0x02
ichpcib0 at pci0 dev 31 function 0 "Intel 82801BA LPC" rev 0x08: PM disabled pciide0 at pci0 dev 31 function 1 "Intel 82801BA IDE" rev 0x00: DMA, channel 0 wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: <Virtual HDD [0]>
wd0: 128-sector PIO, LBA48, 8000MB, 16384032 sectors
atapiscsi0 at pciide0 channel 0 drive 1
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <PRL, Virtual CD-ROM, R103> ATAPI 5/ cdrom removable
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
cd0(pciide0:0:1): using PIO mode 4, Ultra-DMA mode 1
pciide0: channel 1 ignored (disabled)
auich0 at pci0 dev 31 function 5 "Intel 82801BA AC97" rev 0x02: irq 9, ICH2 AC97
ac97: codec id 0x414c4710 (Avance Logic ALC200)
ac97: codec features 18 bit DAC, 18 bit ADC, Realtek 3D
audio0 at auich0
isa0 at ichpcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pmsi0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pmsi0 mux 0
sb0 at isa0 port 0x220/24 irq 5 drq 1: dsp v4.05
midi0 at sb0: <SB MIDI UART>
audio1 at sb0
opl at sb0 not configured
pcppi0 at isa0 port 0x61
midi1 at pcppi0: <PC speaker>
spkr0 at pcppi0
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
biomask e9dd netmask eddd ttymask fddf
mtrr: CPU supports MTRRs but not enabled
softraid0 at root
root on wd0a swap on wd0b dump on wd0b

Reply via email to