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 

Syntax errors from GNU program source code.

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



Joined: 28 Sep 2005
Posts: 6

PostPosted: Wed Sep 28, 2005 7:54 am    Post subject: Syntax errors from GNU program source code. Reply with quote

I am try as best I can to port some software to my psp for a class im taking here at school (nano the text editor). Thanks to you guys here for making it so easy to get started. Heres my problem.

Code:
/usr/include/ncurses.h:553: error: syntax error before '*' token
/usr/include/ncurses.h:639: error: syntax error before 'FILE'


and here is the line a few before and a few after in the corresponding
ncurses.h

Code:

551 extern NCURSES_EXPORT(int) getnstr (char *, int);           /* generated */
    552 extern NCURSES_EXPORT(int) getstr (char *);             /* generated */
    553 extern NCURSES_EXPORT(WINDOW *) getwin (FILE *);            /* implemented */
    554 extern NCURSES_EXPORT(int) halfdelay (int);             /* implemented */
    555 extern NCURSES_EXPORT(bool) has_colors (void);              /* implemented */


and the second error

Code:
 
636 extern NCURSES_EXPORT(int) mvwvline (WINDOW *,int, int, chtype, int);   /* generated */
    637 extern NCURSES_EXPORT(int) napms (int);                 /* implemented */
    638 extern NCURSES_EXPORT(WINDOW *) newpad (int,int);               /* implemented */
    639 extern NCURSES_EXPORT(SCREEN *) newterm (NCURSES_CONST char *,FILE *,FILE *);   /* implemented */
    640 extern NCURSES_EXPORT(WINDOW *) newwin (int,int,int,int);           /* implemented */




heres my makefile also for you guys.

Code:

TARGET = nano
OBJS = color.o cut.o files.o global.o move.o nano.o rcfile.o search.o utils.o winio.o

INCDIR = intl /usr/local/share /usr/include
CFLAGS = -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

LIBDIR =
LDFLAGS =
LIBS= -lpspgum -lpspgu -lm -lncurses

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Nano

PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak


I know I probably have bigger problems but I will get to those once I get these syntax errors solved. Is there some preprocessor I need to define or is there something I need to add to the makefile?

thanks
Back to top
View user's profile Send private message
mrbrown



Joined: 17 Jan 2004
Posts: 1536

PostPosted: Wed Sep 28, 2005 8:12 am    Post subject: Reply with quote

You need to stop trying to build with ncurses which hasn't been ported to the PSP.
Back to top
View user's profile Send private message
nousplacidus



Joined: 28 Sep 2005
Posts: 6

PostPosted: Wed Sep 28, 2005 9:45 am    Post subject: Reply with quote

Well that pretty much sucks, I took the -lncurses flag out, and still no luck, I don't think that answers my question about the syntax error though it might. I just don't see why it wouldn't give me something with regards to an undeclared symbol or something along those lines.

Regards
Back to top
View user's profile Send private message
nousplacidus



Joined: 28 Sep 2005
Posts: 6

PostPosted: Thu Sep 29, 2005 5:40 pm    Post subject: Reply with quote

Ok maybe I should refrase this,

what is causing the syntax error OTHER than ncurses, because that has nothing to do with the compiler seeing that and recognizing it as a syntax error because its doing in the same thing in one of my other attempts on a different program.

thanks
Back to top
View user's profile Send private message
Jim



Joined: 02 Jul 2005
Posts: 487
Location: Sydney

PostPosted: Thu Sep 29, 2005 5:43 pm    Post subject: Reply with quote

Maybe you should read a manual. Removing -lncurses just gets rid of the linker trying to access the ncurses library you can't build. Problem is, ncurses won't build on PSP without extra work. You need to do that work.

Jim
_________________
http://www.dbfinteractive.com
Back to top
View user's profile Send private message Visit poster's website
nousplacidus



Joined: 28 Sep 2005
Posts: 6

PostPosted: Fri Sep 30, 2005 5:08 am    Post subject: Reply with quote

got it, ncurses won't compile...

What is the syntax error, I have tried compiling other things that give me the same syntax error and have NOTHING TO DO with ncurses.

thanks....

Code:
/usr/include/openssl/evp.h:277: error: syntax error before '*' token
/usr/include/openssl/evp.h:278: error: syntax error before '*' token
/usr/include/openssl/evp.h:279: error: syntax error before '*' token
/usr/include/openssl/evp.h:280: error: syntax error before '*' token





and heres the corresponding lines from evp.h

Code:

    277     int (*init)(EVP_MD_CTX *ctx);
    278     int (*update)(EVP_MD_CTX *ctx,const void *data,unsigned long count);
    279     int (*final)(EVP_MD_CTX *ctx,unsigned char *md);
    280     int (*copy)(EVP_MD_CTX *to,const EVP_MD_CTX *from);
Back to top
View user's profile Send private message
Jim



Joined: 02 Jul 2005
Posts: 487
Location: Sydney

PostPosted: Fri Sep 30, 2005 8:02 am    Post subject: Reply with quote

In this case, the compiler reaches those lines and doesn't know the types WINDOW and FILE. For some reason it hasn't seen them yet. Probably because the build isn't configured properly.
Try building something simpler to start with.

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