To compile under Windows

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

Moderators: cheriff, Herben

Post Reply
BiB
Posts: 36
Joined: Fri Feb 27, 2004 8:13 am
Location: France

To compile under Windows

Post 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
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post 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.
BiB
Posts: 36
Joined: Fri Feb 27, 2004 8:13 am
Location: France

Post by BiB »

Ok thanks

I tried before with Cygwin but it never worked.

I will try with VS6.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post 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.
BiB
Posts: 36
Joined: Fri Feb 27, 2004 8:13 am
Location: France

Post 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 ?
BiB
Posts: 36
Joined: Fri Feb 27, 2004 8:13 am
Location: France

Post 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 ???
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post 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.
User avatar
Drakonite
Site Admin
Posts: 990
Joined: Sat Jan 17, 2004 1:30 am
Contact:

Post 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.
Shoot Pixels Not People!
Makeshift Development
BiB
Posts: 36
Joined: Fri Feb 27, 2004 8:13 am
Location: France

Post 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:
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

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