Page 1 of 1
problem with ps2lib!
Posted: Fri Jul 20, 2007 8:13 am
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....
Posted: Fri Jul 20, 2007 9:43 am
by emoon
ps2lib is very outdated. Consider using ps2sdk instead.
Posted: Sat Jul 21, 2007 8:17 am
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?
Posted: Sat Jul 21, 2007 9:08 am
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.
Posted: Sun Jul 22, 2007 5:20 am
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...
Posted: Sun Jul 22, 2007 7:00 am
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.
Posted: Sun Jul 22, 2007 7:13 am
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?
Posted: Sun Jul 22, 2007 8:52 am
by emoon
whats the error output when you do that?
Posted: Sun Jul 22, 2007 9:23 am
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
Posted: Sun Jul 22, 2007 9:55 am
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.
Posted: Sun Jul 22, 2007 4:54 pm
by apache37
Looks like you are building a windows application. Definately go the the command line inside a sample directory and run make.
Posted: Sun Jul 22, 2007 7:23 pm
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?
Posted: Sun Jul 22, 2007 10:59 pm
by Jim
make
Posted: Mon Jul 23, 2007 1:35 am
by MabFan
and there are no parameters? lol i´m an idiot^^
Posted: Mon Jul 23, 2007 8:54 am
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.