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 

problem with ps2lib!

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



Joined: 17 Jul 2007
Posts: 7

PostPosted: Fri Jul 20, 2007 8:13 am    Post subject: problem with ps2lib! Reply with quote

Hey guys!

I have a problem with the ps2lib. I was reading this tutorial:
http://forums.ps2dev.org/viewtopic.php?t=854&highlight=eclipse+ps2dev

step 12 is my problem now. When I try to compile the ps2lib, the compiler shows me 4 errors :
1)C:/ps2dev/MinGW/include/io.h "FILENAME_MAX" undeclared her (not in a
function) line 75
2)C:/ps2dev/MinGW/include/io.h confuesd by earlier errors, bailing out
line 76
3)conflicting types for "strtol" string.h line 58
4)previous decleration of "strtol" sysclib.h line 29

I solved the problem of 3 and 4. i have added a "const" to the sysclib.h in line 29 :
"long strtol(const char *, char**, int);"

To error 1 and 2... I donīt know what the problem is....
Back to top
View user's profile Send private message
emoon



Joined: 18 Jan 2004
Posts: 91
Location: Stockholm, Sweden

PostPosted: Fri Jul 20, 2007 9:43 am    Post subject: Reply with quote

ps2lib is very outdated. Consider using ps2sdk instead.
Back to top
View user's profile Send private message Visit poster's website
MabFan



Joined: 17 Jul 2007
Posts: 7

PostPosted: Sat Jul 21, 2007 8:17 am    Post subject: Reply with quote

now Iīve installed the ps2sdk and include it in eclipse, but when I try to compile all files, there are a lot more errors like in the ps2lib... is that normal?
Back to top
View user's profile Send private message
emoon



Joined: 18 Jan 2004
Posts: 91
Location: Stockholm, Sweden

PostPosted: Sat Jul 21, 2007 9:08 am    Post subject: Reply with quote

What do you mean with "include it in eclipse"? To compile ps2sdk you will need to use the makefiles or setup eclipse to compile in an identical way.
Back to top
View user's profile Send private message Visit poster's website
MabFan



Joined: 17 Jul 2007
Posts: 7

PostPosted: Sun Jul 22, 2007 5:20 am    Post subject: Reply with quote

"inlucde it in eclipse" - I mean that I setting up the ide, ready to compile, but when I try to compile the sample sourcecode, the compiler gives me a lot of errors...
Back to top
View user's profile Send private message
emoon



Joined: 18 Jan 2004
Posts: 91
Location: Stockholm, Sweden

PostPosted: Sun Jul 22, 2007 7:00 am    Post subject: Reply with quote

exactly which command(s) do you do to compile the code?

I think its better to compile it from commandline to make sure that everything works as expected.
Back to top
View user's profile Send private message Visit poster's website
MabFan



Joined: 17 Jul 2007
Posts: 7

PostPosted: Sun Jul 22, 2007 7:13 am    Post subject: Reply with quote

I compile the program with "mingw32-make -f makefile"... are there not enough parametres? What could I type in when I compile it from the commandline?
Back to top
View user's profile Send private message
emoon



Joined: 18 Jan 2004
Posts: 91
Location: Stockholm, Sweden

PostPosted: Sun Jul 22, 2007 8:52 am    Post subject: Reply with quote

whats the error output when you do that?
Back to top
View user's profile Send private message Visit poster's website
MabFan



Joined: 17 Jul 2007
Posts: 7

PostPosted: Sun Jul 22, 2007 9:23 am    Post subject: Reply with quote

Code:
'Building target: test2.exe'
'Invoking: Cygwin C++ Linker'
g++  -o"test2.exe"  ./cpp-hello.o   
C:/ps2dev/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../libmingw32.a(main.o):main.c:(.text+0x106): undefined reference to `WinMain@16'
collect2: ld returned 1 exit status
mingw32-make: *** [test2.exe] Error 1
Back to top
View user's profile Send private message
emoon



Joined: 18 Jan 2004
Posts: 91
Location: Stockholm, Sweden

PostPosted: Sun Jul 22, 2007 9:55 am    Post subject: Reply with quote

And this happens when you stand in the ps2sdk directory and try to build it?

Describe each step because the output below seems to have nothing with ps2sdk to do, i doubt there is any file called test2 in ps2sdk.
Back to top
View user's profile Send private message Visit poster's website
apache37



Joined: 04 Jun 2004
Posts: 76

PostPosted: Sun Jul 22, 2007 4:54 pm    Post subject: Reply with quote

Looks like you are building a windows application. Definately go the the command line inside a sample directory and run make.
Back to top
View user's profile Send private message
MabFan



Joined: 17 Jul 2007
Posts: 7

PostPosted: Sun Jul 22, 2007 7:23 pm    Post subject: Reply with quote

thats not the output from the cmd when I try to build the sdk, but the output when I try to compile a program in the eclipse IDE... thatīs my problem. The step to build the sdk I have completed.

@apache37
How does the make command looks like?
Back to top
View user's profile Send private message
Jim



Joined: 02 Jul 2005
Posts: 487
Location: Sydney

PostPosted: Sun Jul 22, 2007 10:59 pm    Post subject: Reply with quote

make
_________________
http://www.dbfinteractive.com
Back to top
View user's profile Send private message Visit poster's website
MabFan



Joined: 17 Jul 2007
Posts: 7

PostPosted: Mon Jul 23, 2007 1:35 am    Post subject: Reply with quote

and there are no parameters? lol iīm an idiot^^
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Mon Jul 23, 2007 8:54 am    Post subject: Reply with quote

Well, you DO need the ps2 environment variables set, and you DO need to have the current directory set to the project directory where the ps2 makefile is located. but other than that, just "make" is fine.
Back to top
View user's profile Send private message AIM Address
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