Skip to: Site menu | Main content


Welcome to PSP-Programming.com, a place for developers to get together.

Welcome to the forums. Here you can find other user tutorials as well as homebrew releases and the source code repository. You can also ask for help with your code here and post your own homebrew!

PSP-Programming.com Forums
February 08, 2012, 05:51:07 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

News: Welcome to PSP-Programming.com
Home Help Search Shop Login Register
Digg This!
Pages: [1] 2 3 4
Print
Author Topic: The quickest and easiest way to set up your environment on Windows  (Read 21080 times)
gibbocool
Embellished by our ignorance
News Posters
Hero Member
*

Karma: +34/-11
Offline Offline

Posts: 822
2973.87 points

View Inventory
Send Money to gibbocool

Power Overwhelming


View Profile WWW
« on: June 02, 2007, 04:36:47 PM »

So you want to compile your C/C++ code to work on the PSP and want a quick and easy method to do so?
You've come to the right place! Here I present two options: DevkitPro and MinPSP.

Cygwin is basically a linux-like environment for windows. MinGW is another example of this.
The traditional way to develop on the PSP with windows is to install cygwin, and use it to compile the psp tool chain, which allows you to compile your PSP apps. What DevkitPro and MinPSP does is misses out the middle step - it is a precompiled development environment.

DevkitPro comes with MinGW. The best thing about DevkitPro is that it uses an installer and updater that downloads the latest toolchain, and installs everything for you.

Note that these precompiled envoronments aren't a complete substitute for cygwin, but they gets you started nice and quick. Advanced users may want to get cygwin running.

So what is the difference between DevkitPro and MinPSP? DevkitPro uses MinGW, whereas MinPSP lets you use your windows command prompt.

*Update*

It seems that DevkitPro hasn't been updated in a while, so I recommend MinPSP.

MinPSP

Download DevkitPro
DevkitPro Official Site

« Last Edit: August 24, 2009, 11:37:04 PM by gibbocool » Logged



Insert_Witty_Name
Global Moderator
Hero Member
*

Karma: +149/-17
Offline Offline

Posts: 1602
1141.66 points

View Inventory
Send Money to Insert_Witty_Name

View Profile WWW
« Reply #1 on: June 03, 2007, 08:01:28 AM »

I never tried one of these pre-compiled packages, but I've heard it's hard (or not possible)  to install 3rd part libraries (libpng, libmad) etc on them.

Is that true?
Logged

Coder formerly known as:

Check out my homebrew & C tutorials at http://insomniac.0x89.org
Last updated 6th Oct 06 - Tutorial 2 added.
@rt
You can't just sculpt Willie-Nillie. You've got to go by the book. Follow the rules. Otherwise, you'll never get passed Amateur Hour, here.
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 18
2026.32 points

View Inventory
Send Money to @rt

View Profile
« Reply #2 on: June 03, 2007, 03:25:26 PM »

Do you have to do anything different with your makefile?
My programs compile in cygwin, but in devkitpro I use the same code and ge tthis
Code:
make: psp-config: Command not found
Makefile:25: /lib/build.mak: No such file or directory
make: *** No rule to make target '/lib/build.mak'. Stop.
Logged
gibbocool
Embellished by our ignorance
News Posters
Hero Member
*

Karma: +34/-11
Offline Offline

Posts: 822
2973.87 points

View Inventory
Send Money to gibbocool

Power Overwhelming


View Profile WWW
« Reply #3 on: June 03, 2007, 04:36:41 PM »

@ IWN: I installed zlib and libpng flawlessly, but when i try and compile a program requiring libpng, i get
Code:
graphics.o: In function `imageSave':
graphics.c:(.text+0xee0): undefined reference to `png_create_write_struct'
graphics.c:(.text+0xef0): undefined reference to `png_create_info_struct'
graphics.c:(.text+0xf04): undefined reference to `png_init_io'
graphics.c:(.text+0xf30): undefined reference to `png_set_IHDR'
graphics.c:(.text+0xf3c): undefined reference to `png_write_info'
graphics.c:(.text+0xfcc): undefined reference to `png_write_row'
graphics.c:(.text+0xff0): undefined reference to `png_write_end'
graphics.c:(.text+0xffc): undefined reference to `png_destroy_write_struct'
graphics.c:(.text+0x1044): undefined reference to `png_set_IHDR'
graphics.c:(.text+0x1050): undefined reference to `png_write_info'
graphics.c:(.text+0x1068): undefined reference to `png_destroy_write_struct'
graphics.o: In function `imageLoad':
graphics.c:(.text+0x28b8): undefined reference to `png_create_read_struct'
graphics.c:(.text+0x28dc): undefined reference to `png_set_error_fn'
graphics.c:(.text+0x28e4): undefined reference to `png_create_info_struct'
graphics.c:(.text+0x28f8): undefined reference to `png_init_io'
graphics.c:(.text+0x2904): undefined reference to `png_set_sig_bytes'
graphics.c:(.text+0x2910): undefined reference to `png_read_info'
graphics.c:(.text+0x2938): undefined reference to `png_get_IHDR'
graphics.c:(.text+0x2974): undefined reference to `png_destroy_read_struct'
graphics.c:(.text+0x2a2c): undefined reference to `png_set_strip_16'
graphics.c:(.text+0x2a34): undefined reference to `png_set_packing'
graphics.c:(.text+0x2a68): undefined reference to `png_get_valid'
graphics.c:(.text+0x2a80): undefined reference to `png_set_filler'
graphics.c:(.text+0x2ad4): undefined reference to `png_read_row'
graphics.c:(.text+0x2b48): undefined reference to `png_read_end'
graphics.c:(.text+0x2b58): undefined reference to `png_destroy_read_struct'
graphics.c:(.text+0x2b9c): undefined reference to `png_set_tRNS_to_alpha'
graphics.c:(.text+0x2bac): undefined reference to `png_set_palette_to_rgb'
graphics.c:(.text+0x2bdc): undefined reference to `png_destroy_read_struct'
graphics.c:(.text+0x2c04): undefined reference to `png_set_gray_1_2_4_to_8'
graphics.c:(.text+0x2c34): undefined reference to `png_destroy_read_struct

@ Art: looks like you need to add the directory to your Path correctly -
Go to System Properties > Advanced > Environment Variables > Edit the Path system variable and add c:\devkitPro\devkitPSP\bin. Make sure it is seperated by a semicolon.
« Last Edit: June 03, 2007, 06:04:25 PM by gibbocool » Logged

Insert_Witty_Name
Global Moderator
Hero Member
*

Karma: +149/-17
Offline Offline

Posts: 1602
1141.66 points

View Inventory
Send Money to Insert_Witty_Name

View Profile WWW
« Reply #4 on: June 03, 2007, 06:34:45 PM »

... @ IWN: I installed zlib and libpng flawlessly...

Doesn't look too flawless Wink

This is why I stay away from pre-built binaries.
Logged

Coder formerly known as:

Check out my homebrew & C tutorials at http://insomniac.0x89.org
Last updated 6th Oct 06 - Tutorial 2 added.
jsharrad
Developer
Global Moderator
Hero Member
*

Karma: +44/-1
Offline Offline

Posts: 613
1170.44 points

View Inventory
Send Money to jsharrad

Yarr!


View Profile WWW
« Reply #5 on: June 03, 2007, 09:08:06 PM »

Are you linking zlib and libpng when you compile that?  looks like it hasn't been linked from those errors
Logged

MinerPSP Coder
MinerPSP Website
jono
C/C++ Developer
Full Member
*

Karma: +23/-1
Offline Offline

Posts: 210
282.59 points

View Inventory
Send Money to jono


View Profile WWW
« Reply #6 on: June 03, 2007, 10:03:03 PM »

Have you added -lpng -lz ect. to the libs line in your makefile?
[EDIT] Oops, didn't realise thats what jsharrad said.

If it is actually a problem with where the libraries are located you could just find one of those dev library installers that were around, they just extract all the files to the correct directory and off you go.

I use this devkitpro in my breaks at uni because I can install the compiler and libraries on a computer in about two minutes. I've just got the devkitpro installer and the devlibrary installer on the root of my memory stick aswell as crimson editor just in case theres no source editor.

I have cygwin setup on my home computer however. And I also prefer it, I'm in the process of migrating to linux so it's been helpful to already understand some of the command line functions.
Logged

Good grief
ancoldsun
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 8
537.85 points

View Inventory
Send Money to ancoldsun

View Profile
« Reply #7 on: June 03, 2007, 10:37:56 PM »

So which one is better ? cygwin or devkitpro ?
Logged
gibbocool
Embellished by our ignorance
News Posters
Hero Member
*

Karma: +34/-11
Offline Offline

Posts: 822
2973.87 points

View Inventory
Send Money to gibbocool

Power Overwhelming


View Profile WWW
« Reply #8 on: June 03, 2007, 11:18:20 PM »

Cygwin is better as it's a more complete environment.

@jsharrad yes i have linked with those. I'm actually trying to compile flatmush's text editor. I actually tried the binary libraries before i tried compiling my own - same errors both times.
Logged

Flatmush
Has a normal user title
Administrator
Hero Member
*

Karma: +84/-26
Offline Offline

Posts: 1046
12906.27 points

View Inventory
Send Money to Flatmush

The Omniscient One


View Profile WWW
« Reply #9 on: June 04, 2007, 09:00:03 AM »

If you only want to compile my editor, then I could remake it to use tga's instead of png's and save you the bother, but that wouldn't help your library problem.
Logged

Firmware History: 2.60 -> 2.71 -> 1.50 -> 3.03oe-c

I am nerdier than 66% of all people. Are you nerdier? Click here to find out!I am 62% loser. What about you? Click here to find out!NerdTests.com User Test: The Can I Run A Business Test.

Hehe I'm a "Hero Member" because I bought posts back when they were in the shop.

Creator of FlatEditPSP, funcLib and flAstro
gibbocool
Embellished by our ignorance
News Posters
Hero Member
*

Karma: +34/-11
Offline Offline

Posts: 822
2973.87 points

View Inventory
Send Money to gibbocool

Power Overwhelming


View Profile WWW
« Reply #10 on: June 04, 2007, 04:49:28 PM »

If you only want to compile my editor, then I could remake it to use tga's instead of png's and save you the bother, but that wouldn't help your library problem.
If i really wanted to, I would have done it myself Razz
I'm sure it's just a once-off thing. Could someone else give it a go?
I wont be making programs using png's any time soon it seems Wink
Logged

KeegY
Newbie
*

Karma: +0/-2
Offline Offline

Posts: 2
194.56 points

View Inventory
Send Money to KeegY
int genious == correct; return ME;


View Profile WWW
« Reply #11 on: July 15, 2007, 01:45:42 AM »

mmm, i first started with one of the "pre-compiled" ones and at the time i know nothing different. i also found it hard to update the toolchain etc, so i ended up just placing the headers and stuff in the directory with my main.c. it worked until it all got a bit over my head, and IWN helped me get on track with cygwin and now things are fine, so my advide is that if you can, use cygwin, less hassle.
Logged
Insert_Witty_Name
Global Moderator
Hero Member
*

Karma: +149/-17
Offline Offline

Posts: 1602
1141.66 points

View Inventory
Send Money to Insert_Witty_Name

View Profile WWW
« Reply #12 on: July 22, 2007, 02:57:42 PM »

Indeed.

These pre-compiled things are fine....

Until you need to update the SDK, or use a third-party library (which you will need after before you know it).
Logged

Coder formerly known as:

Check out my homebrew & C tutorials at http://insomniac.0x89.org
Last updated 6th Oct 06 - Tutorial 2 added.
neo
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 17
1171.82 points

View Inventory
Send Money to neo

View Profile
« Reply #13 on: July 24, 2007, 03:57:16 PM »

...or just run an *nix OS environment?
Logged
yaustar
gibbocool rules!
All-Around Dev
Hero Member
*

Karma: +74/-13
Offline Offline

Posts: 523
17011.11 points

View Inventory
Send Money to yaustar


View Profile WWW
« Reply #14 on: July 31, 2007, 09:33:31 AM »

Updating the toolchain is pretty simple with DevkitPro as it works like cygwin. Load the original exe and click update. The only downside is that it only gets updated as often as DevkitPro and not the toolchain. Libraries should be the same as cygwin as it uses minsys (a bash shell). The only difference is that you need to use an external SVN client to download the source.
Logged

Pages: [1] 2 3 4
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.402 seconds with 38 queries.
Sister Sites: Guitar Hero 4   BrokeniTouch.com