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 

Error compiling starsim using Win32 Dev

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



Joined: 20 Jan 2004
Posts: 6
Location: Sydney, Australia

PostPosted: Thu Aug 19, 2004 3:02 pm    Post subject: Error compiling starsim using Win32 Dev Reply with quote

I have just installed a fresh version of Win32 dev using the batch file option. I downloaded starsim to try compiling.

I unpacked the starsim demo source and typed:

make

I get the following:
ee-gcc -O2 -EL -pipe -Wall -Wa,-al -fno-common -Wall -mips3 -mcpu=r5900 -ffreestanding -fnonnull-objects -fno-builtin -fshort-double -nostartfiles -mlong64 -mhard-float -mno-abicalls -c -IC:\PS2Dev\ps2lib/common/include -IC:\PS2Dev\ps2lib/ee/include -c main.c -o main.o > main.lst
cc1: unrecognized option `-fnonnull-objects'
/cygdrive/c/PS2Dev/gcc/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/bin/as: unrecognized option `-mcpu=r5900'
make: *** [main.o] Error 1

I removed both the -fnonnull-objects and -mcpu=r5900 options from the Makefile and tried make again:

ee-gcc -O2 -EL -pipe -Wall -Wa,-al -fno-common -Wall -mips3 -ffreestanding -fno-builtin -fshort-double -nostartfiles -mlong64 -mhard-float -mno-abicalls -c -IC:\PS2Dev\ps2lib/common/include -IC:\PS2Dev\ps2lib/ee/include -c main.c -o main.o
> main.lst
In file included from main.c:31:
/cygdrive/c/PS2Dev/gcc/ee/ee/sys-include/stdlib.h:57: parse error before '(' token
In file included from main.c:32:
nprintf.h:3: conflicting types for `nprintf'
C:/PS2Dev/ps2lib/ee/include/kernel.h:291: previous declaration of `nprintf'
main.c: In function `main':
main.c:129: warning: implicit declaration of function `sif_rpc_init'
main.c:167: warning: implicit declaration of function `k_FlushCache'
make: *** [main.o] Error 1

So then I decided to comment out the printf.h include in main.c as it's already possibly declared. Run make again:

ee-gcc -O2 -EL -pipe -Wall -Wa,-al -fno-common -Wall -mips3 -ffreestanding -fno-builtin -fshort-double -nostartfiles -mlong64 -mhard-float -mno-abicalls -c -IC:\PS2Dev\ps2lib/common/include -IC:\PS2Dev\ps2lib/ee/include -c main.c -o main.o
> main.lst
In file included from main.c:31:
/cygdrive/c/PS2Dev/gcc/ee/ee/sys-include/stdlib.h:57: parse error before '(' token
main.c: In function `main':
main.c:129: warning: implicit declaration of function `sif_rpc_init'
main.c:167: warning: implicit declaration of function `k_FlushCache'
make: *** [main.o] Error 1

Fixed three errors but I can't get any further. Can anyone advise if I am going about this correctly?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Lukasz



Joined: 19 Jan 2004
Posts: 248
Location: Denmark

PostPosted: Thu Aug 19, 2004 9:22 pm    Post subject: Reply with quote

ps2lib's function names have changed a litte, sif_rpc_init is now SifRpcInit etc. But you can include compat.h (i think..) and you can use the old function names.

Also it might be worth switching to ps2sdk since its ps2lib and ps2drv merged.
Back to top
View user's profile Send private message Visit poster's website
Yoda



Joined: 17 Aug 2004
Posts: 1
Location: London, UK

PostPosted: Fri Aug 20, 2004 12:50 am    Post subject: Reply with quote

Hi,
im having exactly the same problem.
Ive included compat.h and it worked to get rid of the warnings about implicitly declaring those two functions but i still get the following parse error and cant figure out what wrong.

ee-gcc -O2 -EL -pipe -Wall -Wa,-al -fno-common -Wall -march=r5900 -ffreestanding -fno-builtin -fshort-double -nostartfiles -mlong64 -mhard-float -mno-abicalls -c -IC:\PS2Dev\ps2lib/common/include -IC:\PS2Dev\ps2lib/ee/include -c main.c -o main.o > main.lst
In file included from main.c:31:
/cygdrive/c/PS2Dev/gcc/ee/ee/sys-include/stdlib.h:57: parse error before '(' token
make: *** [main.o] Error 1

any help would be appreciated.

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



Joined: 19 Jan 2004
Posts: 248
Location: Denmark

PostPosted: Fri Aug 20, 2004 4:12 pm    Post subject: Reply with quote

Well, I don't think you want to include cygdrive/c/PS2Dev/gcc/ee/ee/sys-include/stdlib.h, try putting -nostdlib as a link argument, it will ignore the gcc standard libs, i'm not 100% sure it will fix your included header problem, but its worth a shot.

If you absolutely need stdlib.h, try to see if the functions you need from stdlib.h aren't also included in ps2lib, it does contain string functions, malloc, printf, etc.

If you are porting something, newlib might be worth considering, since it contains alot of the standard C libs, although I recommend that you do not use it, since it isn't optimized very well for PS2 in some parts.
Back to top
View user's profile Send private message Visit poster's website
Shine



Joined: 03 Dec 2004
Posts: 728
Location: Germany

PostPosted: Sun Dec 05, 2004 9:54 am    Post subject: Re: Error compiling starsim using Win32 Dev Reply with quote

sausage wrote:
I have just installed a fresh version of Win32 dev using the batch file option. I downloaded starsim to try compiling.

I unpacked the starsim demo source and typed:

make

I get the following:
ee-gcc -O2 -EL -pipe -Wall -Wa,-al -fno-common -Wall -mips3 -mcpu=r5900 -ffreestanding -fnonnull-objects -fno-builtin -fshort-double -nostartfiles -mlong64 -mhard-float -mno-abicalls -c -IC:\PS2Dev\ps2lib/common/include -IC:\PS2Dev\ps2lib/ee/include -c main.c -o main.o > main.lst
cc1: unrecognized option `-fnonnull-objects'
/cygdrive/c/PS2Dev/gcc/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/bin/as: unrecognized option `-mcpu=r5900'
make: *** [main.o] Error 1



If you solve this problem, you'll get some more :-) Try my changed package from http://www.frank-buss.de/ps2/starsim.zip and please report, if it works and if my new vector font addition works on your PS.
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