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 

scr_ problems help

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



Joined: 11 Dec 2005
Posts: 121

PostPosted: Thu Feb 02, 2006 7:51 am    Post subject: scr_ problems help Reply with quote

wel im trying to compile a new project to use the mc fncs, my poject is dumping memory but im having problems when i go to use scr_printf
ERROR
Code:

jordan@jordy:/usr/local/ps2dev/ps2sdk/samples/CMPdump$ make
ee-gcc -D_EE -O2 -G0 -Wall  -I/usr/local/ps2dev/ps2sdk/ee/include -I/usr/local/ps2dev/ps2sdk/common/include -I.  -c cmp_dump.c -o cmp_dump.o
cmp_dump.c: In function `main':
cmp_dump.c:120: warning: implicit declaration of function `Dump'
cmp_dump.c:131: warning: control reaches end of non-void function
cmp_dump.c: At top level:
cmp_dump.c:136: warning: return type defaults to `int'
cmp_dump.c: In function `Dump':
cmp_dump.c:146: warning: control reaches end of non-void function
ee-gcc -mno-crt0 -T/usr/local/ps2dev/ps2sdk/ee/startup/linkfile -L/usr/local/ps2dev/ps2sdk/ee/lib  \
        -o cmp_dump.elf /usr/local/ps2dev/ps2sdk/ee/startup/crt0.o cmp_dump.o -lmc -lc -lc -lkernel
cmp_dump.o(.text+0x14): In function `main':
cmp_dump.c: undefined reference to `init_scr'
cmp_dump.o(.text+0x30):cmp_dump.c: undefined reference to `scr_printf'
cmp_dump.o(.text+0x58):cmp_dump.c: undefined reference to `scr_printf'
cmp_dump.o(.text+0xfc):cmp_dump.c: undefined reference to `scr_printf'
cmp_dump.o(.text+0x150):cmp_dump.c: undefined reference to `scr_printf'
cmp_dump.o(.text+0x174):cmp_dump.c: undefined reference to `scr_printf'
cmp_dump.o(.text+0x1a0):cmp_dump.c: more undefined references to `scr_printf' follow
collect2: ld returned 1 exit status
make: *** [cmp_dump.elf] Error 1


i am also wondering what is wrong with my Dump function, heres my source for it and the command to write it.

Code:
Dump(int handle, char *buf, int len)
{
    int ret;

    ret =  mcWrite(handle, buf, len);
   if(ret < 0){
      scr_printf("ERROR WRITING DUMP");
      SleepThread();
   }
   mcSync(0, NULL, &ret);

};

THE CALL
Dump(handle, 0x00100000, 200000);

thanks
Back to top
View user's profile Send private message
Drakonite
Site Admin


Joined: 17 Jan 2004
Posts: 989

PostPosted: Thu Feb 02, 2006 9:04 am    Post subject: Reply with quote

Um, you need a type for the function.

And you need to include debug.h to use scr_ functions
_________________
Shoot Pixels Not People!
Makeshift Development
Back to top
View user's profile Send private message Visit poster's website
JorDy



Joined: 11 Dec 2005
Posts: 121

PostPosted: Fri Feb 03, 2006 1:53 am    Post subject: Reply with quote

ive inlcuded debug already but what do you mean type?

aha! i worked out my problem lol stupid me =) forgot to place in the make file
Code:
-ldebug


hehe sorry for the pointless topic now
Back to top
View user's profile Send private message
misfire



Joined: 06 Sep 2004
Posts: 120
Location: Germany

PostPosted: Fri Feb 03, 2006 6:23 pm    Post subject: Reply with quote

By type he means the return type of your Dump() function.
You have to use int/char/void for no return value/etc.

For example:
Code:
void Dump(int handle, char *buf, int len);
Back to top
View user's profile Send private message
JorDy



Joined: 11 Dec 2005
Posts: 121

PostPosted: Sat Feb 04, 2006 1:33 am    Post subject: Reply with quote

yes i managed to fix that and the other problem was its position in my source which caused a warning
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 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