| View previous topic :: View next topic |
| Author |
Message |
MabFan
Joined: 17 Jul 2007 Posts: 7
|
Posted: Fri Jul 20, 2007 8:13 am Post subject: problem with ps2lib! |
|
|
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 |
|
 |
emoon

Joined: 18 Jan 2004 Posts: 91 Location: Stockholm, Sweden
|
Posted: Fri Jul 20, 2007 9:43 am Post subject: |
|
|
| ps2lib is very outdated. Consider using ps2sdk instead. |
|
| Back to top |
|
 |
MabFan
Joined: 17 Jul 2007 Posts: 7
|
Posted: Sat Jul 21, 2007 8:17 am Post subject: |
|
|
| 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 |
|
 |
emoon

Joined: 18 Jan 2004 Posts: 91 Location: Stockholm, Sweden
|
Posted: Sat Jul 21, 2007 9:08 am Post subject: |
|
|
| 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 |
|
 |
MabFan
Joined: 17 Jul 2007 Posts: 7
|
Posted: Sun Jul 22, 2007 5:20 am Post subject: |
|
|
| "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 |
|
 |
emoon

Joined: 18 Jan 2004 Posts: 91 Location: Stockholm, Sweden
|
Posted: Sun Jul 22, 2007 7:00 am Post subject: |
|
|
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 |
|
 |
MabFan
Joined: 17 Jul 2007 Posts: 7
|
Posted: Sun Jul 22, 2007 7:13 am Post subject: |
|
|
| 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 |
|
 |
emoon

Joined: 18 Jan 2004 Posts: 91 Location: Stockholm, Sweden
|
Posted: Sun Jul 22, 2007 8:52 am Post subject: |
|
|
| whats the error output when you do that? |
|
| Back to top |
|
 |
MabFan
Joined: 17 Jul 2007 Posts: 7
|
Posted: Sun Jul 22, 2007 9:23 am Post subject: |
|
|
| 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 |
|
 |
emoon

Joined: 18 Jan 2004 Posts: 91 Location: Stockholm, Sweden
|
Posted: Sun Jul 22, 2007 9:55 am Post subject: |
|
|
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 |
|
 |
apache37
Joined: 04 Jun 2004 Posts: 76
|
Posted: Sun Jul 22, 2007 4:54 pm Post subject: |
|
|
| Looks like you are building a windows application. Definately go the the command line inside a sample directory and run make. |
|
| Back to top |
|
 |
MabFan
Joined: 17 Jul 2007 Posts: 7
|
Posted: Sun Jul 22, 2007 7:23 pm Post subject: |
|
|
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 |
|
 |
Jim

Joined: 02 Jul 2005 Posts: 487 Location: Sydney
|
|
| Back to top |
|
 |
MabFan
Joined: 17 Jul 2007 Posts: 7
|
Posted: Mon Jul 23, 2007 1:35 am Post subject: |
|
|
| and there are no parameters? lol iīm an idiot^^ |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Mon Jul 23, 2007 8:54 am Post subject: |
|
|
| 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 |
|
 |
|