| View previous topic :: View next topic |
| Author |
Message |
ShUr1k3n
Joined: 16 Oct 2005 Posts: 42
|
Posted: Sat Nov 12, 2005 9:47 pm Post subject: Math.h !!! |
|
|
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 |
|
| Back to top |
|
 |
Paco
Joined: 09 Oct 2005 Posts: 54
|
Posted: Sat Nov 12, 2005 11:11 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
mrbrown
Joined: 17 Jan 2004 Posts: 1536
|
Posted: Sun Nov 13, 2005 2:23 am Post subject: |
|
|
| You can also update to GCC 4.0.2 (PSPDEV 20051022) which is the latest version of the toolchain. |
|
| Back to top |
|
 |
ShUr1k3n
Joined: 16 Oct 2005 Posts: 42
|
Posted: Sun Nov 13, 2005 6:33 am Post subject: |
|
|
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: | TARGET = sdktest
OBJS = main.o graphics.o
INCDIR =
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LDFLAGS =
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Graficos
include $(PSPSDK)/lib/build.mak
|
The Graphics.o is the "pg.o"...
Regards,
ShUr1k3n |
|
| Back to top |
|
 |
Jim

Joined: 02 Jul 2005 Posts: 487 Location: Sydney
|
Posted: Sun Nov 13, 2005 8:30 am Post subject: |
|
|
Just check you haven't got a stray character in your C file just before where you include math.h.
Jim _________________ http://www.dbfinteractive.com |
|
| Back to top |
|
 |
ShUr1k3n
Joined: 16 Oct 2005 Posts: 42
|
Posted: Sun Nov 13, 2005 9:10 am Post subject: |
|
|
Hi ppl,
problem solved...
This code:
| Code: |
#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: |
#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 |
|
| Back to top |
|
 |
Jim

Joined: 02 Jul 2005 Posts: 487 Location: Sydney
|
Posted: Mon Nov 14, 2005 7:01 am Post subject: |
|
|
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 _________________ http://www.dbfinteractive.com |
|
| Back to top |
|
 |
|