Page 1 of 1

To compile under Windows

Posted: Mon Jun 28, 2004 2:08 am
by BiB
Hello

I'm a newbie ans i think my question will be stupid for you but please answer me :wink:

I don't have linux so i downloaded compiler for windows.
I tried to compile the hello sample from the ps2sdk.
But when i try to compile the makefile is wrong (it is made for linux)
I tried to replace all the '/' by '\' but ee-gcc tells me that :

The command line executed is the following :

ee-gcc -nostartfiles -TC:\ps2dev\sdk\ee\startup\linkfile
-LC:\ps2dev\sdk\ee\lib -o hello.elf C:\ps2dev\sdk\ee\startup\crt0.o hello.o -lc -lkernel -lsyscall -lc

And the result is :

ee-gcc : C:ps2devsdkeestartupcrt0.o : No such file or directory

All lib and include directories are OK but i don't understand why the compiler remove all the '\' in the path.

Do you have an idea ?

Thanks a lot

Posted: Mon Jun 28, 2004 5:07 am
by J.F.
You really need a CygWin command shell to handle the path names correctly. MinGW would probably also work. There's also a page somewhere which describes how to use the unix paths option of VS6 (or better) to use VS as your command shell for compiling in Windows.

Posted: Mon Jun 28, 2004 8:38 am
by BiB
Ok thanks

I tried before with Cygwin but it never worked.

I will try with VS6.

Posted: Mon Jun 28, 2004 11:15 am
by J.F.
Remember that you are not using the VS compilers. You have to set the project to use an external tool which you set to the PS2 crosscompilers. I used to use CygWin to use the W32 crosscompilers. I've since switched to Linux.

Posted: Mon Jun 28, 2004 8:23 pm
by BiB
Ok thanks.

I also tried with dev-cpp, configure the compiler and there was only one problem.

After setting up include path and lib path i had only one error when compiling :
'Unable to run program' line 2
I didn't run the prog, just compiled it.

Do you know where the problem is ?

Posted: Tue Jun 29, 2004 1:53 am
by BiB
Finally i installed Cygwin but i still have a problem.

I still want to compile the hello example from the ps2sdk library.

When compiling, it doesn't find sio.h but the file is in the include directory which is in -I option.

When i comment in the code #include <sio.h> and the call to this library, i have the same problem with crt0.o

Could you help me please ???

Posted: Tue Jun 29, 2004 12:45 pm
by J.F.
We need more info on what you are doing. Please post the makefiles and what your environment variables are. Most of the PS2 stuff uses an environment variable for the path to the ps2dev directory. If it is not set, or set incorrectly, the paths used by the makefile won't be correct and it won't find what it's looking for.

Posted: Tue Jun 29, 2004 9:17 pm
by Drakonite
J.F. wrote:We need more info on what you are doing. Please post the makefiles and what your environment variables are. Most of the PS2 stuff uses an environment variable for the path to the ps2dev directory. If it is not set, or set incorrectly, the paths used by the makefile won't be correct and it won't find what it's looking for.
Historically there are many other things that use environment variables too. PS2LIB, PS2SDK, LIBHDD, GSLIB, LIBCDVD, PS2IP, PS2ETH, PS2DRV.... the list goes on and on :(
Fortunately most of these are rendered obsolete now that PS2SDK is around. The only problem is, a lot of things are still using the old environment and haven't yet been brought up to PS2SDK.

Posted: Tue Jun 29, 2004 10:55 pm
by BiB
Thanks for all your answers but when reading another post, i found a link to a toolchain script. I tried it and it works perfectly under Cygwin.

Now i can compile the hello example without any problem.

:)

Thanks J.F and Drakonite :wink:

Posted: Wed Jun 30, 2004 8:43 am
by J.F.
You're welcome. Good to see you got it going. Sometimes, all it takes is knowing that others were able to get it working to keep you at it until you get it working as well.