i dont understand my error log

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

Moderators: cheriff, TyRaNiD

Post Reply
S4LVAT10N
Posts: 16
Joined: Sun Dec 27, 2009 3:22 am

i dont understand my error log

Post by S4LVAT10N »

C:\PSPSDK\MYPROJ~1\SALVAT~1>make
psp-gcc -I. -IC:/pspsdk/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=
-o main.o main.c
main.c:8:2: error: invalid preprocessing directive #inlcude
main.c: In function 'main':
main.c:79: error: 'O_RDONLY' undeclared (first use in this function)
main.c:79: error: (Each undeclared identifier is reported only once
main.c:79: error: for each function it appears in.)
main.c:93:1: warning: "PATH" redefined
main.c:84:1: warning: this is the location of the previous definition
main.c:102:1: warning: "PATH" redefined
main.c:93:1: warning: this is the location of the previous definition
main.c:111:1: warning: "PATH" redefined
main.c:102:1: warning: this is the location of the previous definition
main.c:120:1: warning: "PATH" redefined
main.c:111:1: warning: this is the location of the previous definition
main.c:129:1: warning: "PATH" redefined
main.c:120:1: warning: this is the location of the previous definition
main.c:138:1: warning: "PATH" redefined
main.c:129:1: warning: this is the location of the previous definition
MAKE: *** [main.o] Error 1

whats it mean by " invalid preprocessing directive #inlcude"?
and why isnt O_WRONLY or any other of the commands working?

btw the include is #include <pspiofilemgr.h>
cheriff
Regular
Posts: 258
Joined: Wed Jun 23, 2004 5:35 pm
Location: Sydney.au

Re: i dont understand my error log

Post by cheriff »

whats it mean by "invalid preprocessing directive #inlcude
Just that, ie inlcude is not a valid #directive for the preprocessor.
btw the include is #include <pspiofilemgr.h>
I think you'll find that's what it should be, not what you've actually written.

Read the error again:
main.c:8:2: error: invalid preprocessing directive #inlcude
inLCude and inCLude are two different words.


NB: Editors with syntax highlighting are very useful: "Why didnt my #inlcude change to the colour of all other preprocessor commands?" "Oright, I typoed it" *fix*
Damn, I need a decent signature!
S4LVAT10N
Posts: 16
Joined: Sun Dec 27, 2009 3:22 am

Post by S4LVAT10N »

lol ya i just figured that out. thanks. i type to fast and dont look at what im typing so i mess up alot

EDIT: its still saying O_WRONLY and O_CREAT are undeclared...
arnie
Posts: 11
Joined: Sat Apr 11, 2009 6:32 pm

Post by arnie »

1. Read Slowly
2. Type Slowly
3. Think Slowly
4. #include slowly
5. Set PATH slowly
6. Read carefully
7. Type carefully
8. Think carefully
9. #include carefully
10. Set PATH carefully

-arnie
coyotebean
Posts: 18
Joined: Sat Dec 05, 2009 1:02 am

Post by coyotebean »

S4LVAT10N wrote:lol ya i just figured that out. thanks. i type to fast and dont look at what im typing so i mess up alot

EDIT: its still saying O_WRONLY and O_CREAT are undeclared...
Undeclared means undeclared, period.
Common mistake: typo & missing include or define/enum etc.
Compiling error indicates your code is syntactically incorrect.
S4LVAT10N
Posts: 16
Joined: Sun Dec 27, 2009 3:22 am

Post by S4LVAT10N »

lol arnie path is suppose to be like that. it continuosuly changes but i wanted it like that and it works fine. im just trying to add a log to my program and last time i checked you dont need to declare O_CREAT or O_WRONLY....
ne0h
Posts: 386
Joined: Thu Feb 21, 2008 2:15 am

Post by ne0h »

S4LVAT10N, you basically have to know how to write down a C programm for PC, that's a PSP Development forum, not a C programming forum...
Sorry,

ne0h
S4LVAT10N
Posts: 16
Joined: Sun Dec 27, 2009 3:22 am

Post by S4LVAT10N »

but thats the thing. for the most part i could make decent programs for the pc. before i started trying to make a function that made a log on the psp i tested it first on the pc and it worked fine. when i did it on the psp i had not known you needed to have PSP in front. i kept doing O_WRONLY. after i relized i needed to do PSP_O_WRONLY and i already finished the log this morning. thought i do want to learn more on pc i am alot more interested in psp so i want to learn it first. even if it makes life harder for me.

btw the path redefined isnt an error. i want it like that and works the way i wanted it to
arnie
Posts: 11
Joined: Sat Apr 11, 2009 6:32 pm

Post by arnie »

SALVATION,

To be honest, I did not understand your reply.

-arnie
S4LVAT10N
Posts: 16
Joined: Sun Dec 27, 2009 3:22 am

Post by S4LVAT10N »

sorry. i ment like in the error log it repeatedly said path redifined and i thought u thought that was an error and i was just saying i wanted it like that. that it wasnt an error
Post Reply