| View previous topic :: View next topic |
| Author |
Message |
nousplacidus
Joined: 28 Sep 2005 Posts: 6
|
Posted: Wed Sep 28, 2005 7:54 am Post subject: Syntax errors from GNU program source code. |
|
|
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 |
|
 |
mrbrown
Joined: 17 Jan 2004 Posts: 1536
|
Posted: Wed Sep 28, 2005 8:12 am Post subject: |
|
|
| You need to stop trying to build with ncurses which hasn't been ported to the PSP. |
|
| Back to top |
|
 |
nousplacidus
Joined: 28 Sep 2005 Posts: 6
|
Posted: Wed Sep 28, 2005 9:45 am Post subject: |
|
|
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 |
|
 |
nousplacidus
Joined: 28 Sep 2005 Posts: 6
|
Posted: Thu Sep 29, 2005 5:40 pm Post subject: |
|
|
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 |
|
 |
Jim

Joined: 02 Jul 2005 Posts: 487 Location: Sydney
|
Posted: Thu Sep 29, 2005 5:43 pm Post subject: |
|
|
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 |
|
 |
nousplacidus
Joined: 28 Sep 2005 Posts: 6
|
Posted: Fri Sep 30, 2005 5:08 am Post subject: |
|
|
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 |
|
 |
Jim

Joined: 02 Jul 2005 Posts: 487 Location: Sydney
|
Posted: Fri Sep 30, 2005 8:02 am Post subject: |
|
|
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 |
|
 |
|