forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Math.h !!!

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
ShUr1k3n



Joined: 16 Oct 2005
Posts: 42

PostPosted: Sat Nov 12, 2005 9:47 pm    Post subject: Math.h !!! Reply with quote

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
View user's profile Send private message Send e-mail
Paco



Joined: 09 Oct 2005
Posts: 54

PostPosted: Sat Nov 12, 2005 11:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
mrbrown



Joined: 17 Jan 2004
Posts: 1536

PostPosted: Sun Nov 13, 2005 2:23 am    Post subject: Reply with quote

You can also update to GCC 4.0.2 (PSPDEV 20051022) which is the latest version of the toolchain.
Back to top
View user's profile Send private message
ShUr1k3n



Joined: 16 Oct 2005
Posts: 42

PostPosted: Sun Nov 13, 2005 6:33 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Jim



Joined: 02 Jul 2005
Posts: 487
Location: Sydney

PostPosted: Sun Nov 13, 2005 8:30 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
ShUr1k3n



Joined: 16 Oct 2005
Posts: 42

PostPosted: Sun Nov 13, 2005 9:10 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Jim



Joined: 02 Jul 2005
Posts: 487
Location: Sydney

PostPosted: Mon Nov 14, 2005 7:01 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group