I'm trying to use atan2, cos and sin.
I have the -lm flag set, and lib path seems to be pointing to the right place (there is a libm.a there).
At link time, I'm getting:
main.c:(.text+0x954): undefined reference to `atan2'
main.c:(.text+0x968): undefined reference to `cos'
main.c:(.text+0x99c): undefined reference to `sin'
I've searched, but haven't found a definitive answer beyond setting the -lm flag.
Can anyone help?
Thanks,
Lee
Makefile:
Code: Select all
TARGET = hello
OBJS = main.o pg.o
CFLAGS = -O2 -G0 -Wall -lm
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti -lm
ASFLAGS = $(CFLAGS)
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = tactest
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)\lib\build.mak