Math.h !!!

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
ShUr1k3n
Posts: 42
Joined: Sun Oct 16, 2005 9:04 pm

Math.h !!!

Post by ShUr1k3n »

Hello ppl,

i am having a problem with the Lib "math.h"

when i inlcude the lib ( #include <math.h> ),

this give me this error:

psp-gcc -I. -IC:\PSPide\psp\sdk/include -O2 -G0 -Wall -c -o main.o main.c
In file included from main.c:10:
/cygdrive/c/PSPide/bin/../lib/gcc/psp/4.0.0/include/math.h:53: error: parse error before numeric constant
MAKE: *** [main.o] Error 1


what can i do to solve this problem ?!?!?!

Regards,

ShUr1k3n
Paco
Posts: 54
Joined: Sun Oct 09, 2005 6:53 pm

Post by Paco »

Sounds like you have a corrupted math.h. You may want to reinstall the whole thing, or paste here the lines in math.h near the error, so we can see where is the problem and maybe suggest a fix.
Paco
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

You can also update to GCC 4.0.2 (PSPDEV 20051022) which is the latest version of the toolchain.
ShUr1k3n
Posts: 42
Joined: Sun Oct 16, 2005 9:04 pm

Post by ShUr1k3n »

Thks for the answers, but, i use the PSPide C++ 1.0.8.30 to compile the projects...

But when i try to use the Cygwin.. The error continue...

Any idea !?

Do i need to change the MakeFile !?

MakeFile:

Code: Select all

TARGET = sdktest
OBJS = main.o graphics.o

INCDIR = 
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $&#40;CFLAGS&#41; -fno-exceptions -fno-rtti
ASFLAGS = $&#40;CFLAGS&#41;

LIBDIR =
LDFLAGS =

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Graficos

include $&#40;PSPSDK&#41;/lib/build.mak
The Graphics.o is the "pg.o"...

Regards,

ShUr1k3n
User avatar
Jim
Posts: 476
Joined: Sat Jul 02, 2005 10:06 pm
Location: Sydney
Contact:

Post by Jim »

Just check you haven't got a stray character in your C file just before where you include math.h.

Jim
ShUr1k3n
Posts: 42
Joined: Sun Oct 16, 2005 9:04 pm

Post by ShUr1k3n »

Hi ppl,

problem solved...

This code:

Code: Select all

#include <colors.h>
#include <pspkernel.h>
#include <pspdebug.h>
#include <pspctrl.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
give me error...

but this:

Code: Select all

#include <pspkernel.h>
#include <pspdebug.h>
#include <pspctrl.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <colors.h>
don't...

Why !??!

whats the diference between put the "#include <colors.h>" before the "#include <math.h>" and after !?

Well problem solved..

thks for who answer...

Regards,

ShUr1k3n
User avatar
Jim
Posts: 476
Joined: Sat Jul 02, 2005 10:06 pm
Location: Sydney
Contact:

Post by Jim »

Where does colors.h come from? It looks like one of the names defined in there clashes with a symbol from standard C in math.h, which is shouldn't.

Jim
Post Reply