| View previous topic :: View next topic |
| Author |
Message |
JorDy
Joined: 11 Dec 2005 Posts: 121
|
Posted: Thu Feb 02, 2006 7:51 am Post subject: scr_ problems help |
|
|
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 |
|
 |
Drakonite Site Admin

Joined: 17 Jan 2004 Posts: 989
|
Posted: Thu Feb 02, 2006 9:04 am Post subject: |
|
|
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 |
|
 |
JorDy
Joined: 11 Dec 2005 Posts: 121
|
Posted: Fri Feb 03, 2006 1:53 am Post subject: |
|
|
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
hehe sorry for the pointless topic now |
|
| Back to top |
|
 |
misfire
Joined: 06 Sep 2004 Posts: 120 Location: Germany
|
Posted: Fri Feb 03, 2006 6:23 pm Post subject: |
|
|
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 |
|
 |
JorDy
Joined: 11 Dec 2005 Posts: 121
|
Posted: Sat Feb 04, 2006 1:33 am Post subject: |
|
|
| yes i managed to fix that and the other problem was its position in my source which caused a warning |
|
| Back to top |
|
 |
|