problem with ps2lib!

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
MabFan
Posts: 7
Joined: Tue Jul 17, 2007 5:08 am

problem with ps2lib!

Post by MabFan »

Hey guys!

I have a problem with the ps2lib. I was reading this tutorial:
http://forums.ps2dev.org/viewtopic.php? ... pse+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....
User avatar
emoon
Posts: 91
Joined: Sun Jan 18, 2004 10:03 pm
Location: Stockholm, Sweden
Contact:

Post by emoon »

ps2lib is very outdated. Consider using ps2sdk instead.
MabFan
Posts: 7
Joined: Tue Jul 17, 2007 5:08 am

Post by MabFan »

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?
User avatar
emoon
Posts: 91
Joined: Sun Jan 18, 2004 10:03 pm
Location: Stockholm, Sweden
Contact:

Post by emoon »

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.
MabFan
Posts: 7
Joined: Tue Jul 17, 2007 5:08 am

Post by MabFan »

"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...
User avatar
emoon
Posts: 91
Joined: Sun Jan 18, 2004 10:03 pm
Location: Stockholm, Sweden
Contact:

Post by emoon »

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.
MabFan
Posts: 7
Joined: Tue Jul 17, 2007 5:08 am

Post by MabFan »

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?
User avatar
emoon
Posts: 91
Joined: Sun Jan 18, 2004 10:03 pm
Location: Stockholm, Sweden
Contact:

Post by emoon »

whats the error output when you do that?
MabFan
Posts: 7
Joined: Tue Jul 17, 2007 5:08 am

Post by MabFan »

Code: Select all

'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
User avatar
emoon
Posts: 91
Joined: Sun Jan 18, 2004 10:03 pm
Location: Stockholm, Sweden
Contact:

Post by emoon »

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.
apache37
Posts: 76
Joined: Fri Jun 04, 2004 3:13 pm

Post by apache37 »

Looks like you are building a windows application. Definately go the the command line inside a sample directory and run make.
MabFan
Posts: 7
Joined: Tue Jul 17, 2007 5:08 am

Post by MabFan »

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?
User avatar
Jim
Posts: 476
Joined: Sat Jul 02, 2005 10:06 pm
Location: Sydney
Contact:

Post by Jim »

make
MabFan
Posts: 7
Joined: Tue Jul 17, 2007 5:08 am

Post by MabFan »

and there are no parameters? lol i´m an idiot^^
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

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.
Post Reply