How to compile, link and transfer PSP programs from VS.NET

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

barbapapaz
Posts: 2
Joined: Mon Nov 28, 2005 8:09 am

Post by barbapapaz »

i find that your vsmakefile generate a makefile with the begin words

Code: Select all

x2x2x2x---------------Makefile for 'PSPProject2' -------------------#
# This Makefile has been generated by VSMakefile
# Copyright (C) 2005 Florian Zitzelsberger
x2x2x2x is incorrect and he generate my missing separator error[/code]
faustus
Posts: 4
Joined: Mon Jan 16, 2006 10:46 pm

Post by faustus »

i got the error only when i run the code, (compile works fine). Anyway a found a quick turnaround, just modify the msvc-cygwin-make.bat as follow:

@if %2==run goto run
@VSMakefile.exe -a
@:run
@C:\cygwin\bin\bash -c 'export PROJECTDIR=`pwd`;/bin/bash --login -c "cd "$PROJECTDIR";%1 %2 %3 %4"'

Please note that you have to build your project in order to update makefile when running
barbapapaz wrote:i find that your vsmakefile generate a makefile with the begin words

Code: Select all

x2x2x2x---------------Makefile for 'PSPProject2' -------------------#
# This Makefile has been generated by VSMakefile
# Copyright (C) 2005 Florian Zitzelsberger
x2x2x2x is incorrect and he generate my missing separator error[/code]
johnsto
Posts: 30
Joined: Wed Jan 18, 2006 8:52 am

compile error

Post by johnsto »

right, i've got cygwin and the toolchain installed and setup, that's all ok. I used the MSI to install the other stuff into VS2003.

Created new project... compile... and..
------ Build started: Project: PSP Project1, Configuration: Debug Win32 ------

Performing Makefile project actions
Converting PSP Project1.vcproj...
make: psp-config: Command not found
Makefile:20: /lib/build.mak: No such file or directory
make: *** No rule to make target `/lib/build.mak'. Stop.
PSP Project1 : error PRJ0002 : error result returned from 'c:\docume~1\dave\locals~1\temp\bat000004.bat'.

Build log was saved at "file://c:\Documents and Settings\Dave\My Documents\Visual Studio Projects\PSP Project1\Debug\BuildLog.htm"
PSP Project1 - 1 error(s), 0 warning(s)
probably a silly mistake on my part somewhere... anyone know what it is?
Dr. Vegetable
Posts: 171
Joined: Mon Nov 14, 2005 1:32 am
Location: Boston, Massachusetts
Contact:

Post by Dr. Vegetable »

If you Search this forum using the search terms "make psp-config command not found" you would find that this is a commonly-asked question. (Hint: Always select "Search for all terms" when searching!)

The answer to your question can be found here.
johnsto
Posts: 30
Joined: Wed Jan 18, 2006 8:52 am

Post by johnsto »

Dr. Vegetable wrote:The answer to your question can be found here.
cheers, i missed that.
ZMaster
Posts: 29
Joined: Fri Sep 02, 2005 10:14 pm

Post by ZMaster »

faustus wrote:i got the error only when i run the code, (compile works fine).
barbapapaz wrote:i find that your vsmakefile generate a makefile with the begin words

Code: Select all

x2x2x2x---------------Makefile for 'PSPProject2' -------------------#
# This Makefile has been generated by VSMakefile
# Copyright (C) 2005 Florian Zitzelsberger
x2x2x2x is incorrect and he generate my missing separator error[/code]
I'm very sorry. I haven't been around here for a while. However, I managed to reproduce the error and I found a small bug in the VSMakefile.exe code and corrected it. It should now work again (no strange wordings before the comment in the Makefile).

Download the new VSMakefile.exe here: http://www.toy-boy-music.goracer.de/temp/VSMakefile.exe

(Replace [MSVS 2003 Dir]\Vc7\VCWizards\PSP Project\templates\1031\VSMakefile.exe and the VSMakefile.exe file in your project directory)
faustus
Posts: 4
Joined: Mon Jan 16, 2006 10:46 pm

Post by faustus »

it works fine now, thanks. I have another problem, if i put makefile template into different folder makefile is not correctly generated. Example

[project]
|_ [src]
| |_myfile.cpp
|
|_ [include]
| |_ ...
|
|_ [PSP]
|_makefile.tmpl

src files are not managed correctly
instead to have ../src/myfile.cpp i got /src/myfile.cpp
(i've checked ".vcproj" file and its content is right)
thanks
ZMaster
Posts: 29
Joined: Fri Sep 02, 2005 10:14 pm

Post by ZMaster »

faustus wrote:it works fine now, thanks. I have another problem, if i put makefile template into different folder makefile is not correctly generated. [...]
src files are not managed correctly
instead to have ../src/myfile.cpp i got /src/myfile.cpp
(i've checked ".vcproj" file and its content is right)
thanks
It is obligatory to have the makefile.tmpl resident in the same directory with VSMakefile.exe and the .vcproj file.
Remember that VSMakefile.exe does only convert the .vcproj XML file to a standard Makefile and nothing more. Hence, your Makefile will contain the same folders as the .vcproj XML file...
faustus
Posts: 4
Joined: Mon Jan 16, 2006 10:46 pm

Post by faustus »

I have all the needed file as requested but
the problem is that the translation is not done correctly...
As i told previously i have in .vcproj correct path but it isn't in the makefile.
so "..\src\filename.cpp" became "\src\filename.cpp".
Thanks, Fausto
ZMaster wrote: It is obligatory to have the makefile.tmpl resident in the same directory with VSMakefile.exe and the .vcproj file.
Remember that VSMakefile.exe does only convert the .vcproj XML file to a standard Makefile and nothing more. Hence, your Makefile will contain the same folders as the .vcproj XML file...
CaseyB
Posts: 15
Joined: Mon Jan 23, 2006 7:28 am

Post by CaseyB »

Does anyone know if this works with VC++ 2005 Express edition? When I try to set up a makefile project the boxes that let me enter the solution name and the location go away! Then it lets me fill out all of the rest of the info and when I hit finish it says that it successfully created the project, but it doesn't show an open project and the project doesn't exist anywhere on my harddrive! :?
ZMaster
Posts: 29
Joined: Fri Sep 02, 2005 10:14 pm

Post by ZMaster »

faustus wrote:I have all the needed file as requested but
the problem is that the translation is not done correctly...
As i told previously i have in .vcproj correct path but it isn't in the makefile.
so "..\src\filename.cpp" became "\src\filename.cpp".
Thanks, Fausto
I updated the the VSMakefile.exe, again. You can now find the newest version here: http://www.toy-boy-music.goracer.de/temp/VSMakefile.exe
It should now correctly work with the ./ and ../ directories.

CaseyB wrote:Does anyone know if this works with VC++ 2005 Express edition? When I try to set up a makefile project the boxes that let me enter the solution name and the location go away! Then it lets me fill out all of the rest of the info and when I hit finish it says that it successfully created the project, but it doesn't show an open project and the project doesn't exist anywhere on my harddrive! :?
I also updated the Wizard (also contains the newest VSMakefile), so that you can now install it with MSVC8. It installes to the MSVC8 dir by default but if you set the correct path to the VC7 directory it should still work with .NET 2003.
However, I have the full Visual Studio 2005 version and do not use the Express Editions, so I didn't try it with VC8 EE. Use the installer and set the correct path to the ExpressEdition\VC directory and it should work.
http://www.toy-boy-music.goracer.de/tem ... Wizard.msi
CaseyB
Posts: 15
Joined: Mon Jan 23, 2006 7:28 am

Post by CaseyB »

Thank you, I'll give it a try this afternoon and let you know!
CaseyB
Posts: 15
Joined: Mon Jan 23, 2006 7:28 am

Post by CaseyB »

It didn't seem to work. I am not sure if it has something to do with the difference between the Standard and the Express Editions, but the wizard never showed up in the menu. Perhaps that another thing that M$ disabled in this version.
ZMaster
Posts: 29
Joined: Fri Sep 02, 2005 10:14 pm

Post by ZMaster »

CaseyB wrote:It didn't seem to work. I am not sure if it has something to do with the difference between the Standard and the Express Editions, but the wizard never showed up in the menu. Perhaps that another thing that M$ disabled in this version.
Try to verify that the files are installed correctly. The Express Editions might have a different folder structure: Go to your MSVC directory. Mine is, for example: C:\Program Files\Microsoft Visual Studio 8\VC\
For the wizard, this dir should look something like this:

[VC]
|-bin
|-include
|-lib
|-...
|
|-vcprojects
||-VSWizardPSP.ico
||-VSWizardPSP.vsdir
||-VSWizardPSP.vsz
||-...
|
|-VCWizards
||-PSP Project
|||-html
|||-images
|||-scripts
|||-templates
|
|-...

The Express Edition might directly install to a directory such as C:\Program Files\Microsoft Visual C++ 2005 EE\, without the subfolder VC.

In Visual C++, click File->New->Project and select the topmost parent node in the Project Types list: Visual C++ that is. This should show you all the available wizards, including PSP Project (it's the first item in the list with my installation - should have the red PSP logo), if you have the files in the correct directories. If you select some child node, such as General or Win32 the PSP Project wizard will NOT appear!

I'm not sure, but I think custom wizards work with EE since the Platform SDK also installs MFC and ATL wizards, then why should the PSP wizard not work?
faustus
Posts: 4
Joined: Mon Jan 16, 2006 10:46 pm

Post by faustus »

ZMaster wrote:I updated the the VSMakefile.exe, again. You can now find the newest version here: http://www.toy-boy-music.goracer.de/temp/VSMakefile.exe
It should now correctly work with the ./ and ../ directories.
Perfect, thanks a lot
CaseyB
Posts: 15
Joined: Mon Jan 23, 2006 7:28 am

Post by CaseyB »

I figured it out! the directory that it needs to go in is C:\Program Files\Microsoft Visual Studio 8\VC\Express\VCProjects. What threw mw off is that there is a VCProjects directiry in VC too! I copied the stuff over there and it seems to be working now! Thank you guys so much!
fish
Posts: 25
Joined: Wed Feb 08, 2006 5:12 am

Post by fish »

Hey, just another request for info on doing this in VC6, I've never setup a custom script/makefile before so havent a clue how to even translate the .net version to vc6.
Grover Again wrote:Hexdump - you can do similar things with VC6. But then again, why use VC6 when .NET toolkit is free :)
http://msdn.microsoft.com/visualc/vctoolkit2003/
BTW I have both installed, and they dont interfere with each other too much.
Also, I know this, but don't like the .NET IDE, theres some nice things, but not enough to get me to switch (mainly because it runs like a dog on this machine:))

any suggestions as to what to do?
fish
Posts: 25
Joined: Wed Feb 08, 2006 5:12 am

Post by fish »

Ok, I grabbed a copy of the Express Edition to try it, and i install the wizard and can see it in the newproject menu, but I cant make a new one:/ I get the error:

creating project 'PSPProj1'... Project creation failed.

in the status bar, I can create other (win32) projects fine though:/
ZMaster
Posts: 29
Joined: Fri Sep 02, 2005 10:14 pm

Post by ZMaster »

Concerning your VC6 problem I'm afraid, I can't help since I did not extensivle enough use VC6 to help you with that. However, the wizard requires the custom wizard engine v. 7.1 at least and this version ships with .NET 2003 so I think it won't work with VC6.
I would suggest you to get the VC++ EE as long as it's still free (seems like you did that anyway).
fish wrote:Ok, I grabbed a copy of the Express Edition to try it, and i install the wizard and can see it in the newproject menu, but I cant make a new one:/ I get the error:

creating project 'PSPProj1'... Project creation failed.

in the status bar, I can create other (win32) projects fine though:/
Sounds strange. Try all of the following things:
1) Enter a project name with no blankspaces, like Test01 or PSPProj1 for example.
2) The wizard configuration page is executed through an Internet Explorer interface and it may block the Java script, which creates the final project files. If the page asks you to allow the content to be executed (bar at the top of the first wizard page), do so or else it won't work.
3) You may also be trying to create the new project at a destination where you don't have file write permissions. (read-only, network-drive, user home directory, etc.)

If none of the above will help, ask again...
fish
Posts: 25
Joined: Wed Feb 08, 2006 5:12 am

Post by fish »

ZMaster wrote:Concerning your VC6 problem I'm afraid, I can't help since I did not extensivle enough use VC6 to help you with that. However, the wizard requires the custom wizard engine v. 7.1 at least and this version ships with .NET 2003 so I think it won't work with VC6.
I would suggest you to get the VC++ EE as long as it's still free (seems like you did that anyway).
fish wrote:Ok, I grabbed a copy of the Express Edition to try it, and i install the wizard and can see it in the newproject menu, but I cant make a new one:/ I get the error:

creating project 'PSPProj1'... Project creation failed.

in the status bar, I can create other (win32) projects fine though:/
Sounds strange. Try all of the following things:
1) Enter a project name with no blankspaces, like Test01 or PSPProj1 for example.
2) The wizard configuration page is executed through an Internet Explorer interface and it may block the Java script, which creates the final project files. If the page asks you to allow the content to be executed (bar at the top of the first wizard page), do so or else it won't work.
3) You may also be trying to create the new project at a destination where you don't have file write permissions. (read-only, network-drive, user home directory, etc.)

If none of the above will help, ask again...
None of that helps, I was already doing the no-spaces names and I'm admin ion the machine so can write anywhere, the wizard never appears so it's not that.
found some other ppl out in the wild of the internet with a similar problem though. I think it's to do with the beta versions of .Net that I've played around with, apparently it really screws over your system and you have to uninstall things in special order with a special tool to sort it all out:/ hopefully this'll fix it...
Polska12
Posts: 3
Joined: Sun Feb 26, 2006 10:11 am

Thanks for the wizard

Post by Polska12 »

By the way ZMater this wizard you supplied is brilliant, I didn't realize you could write custom projects but having looked at the script provided I'll know how to set up future project for different non-PSP dev. Brilliant script, thank you very much.
ZMaster
Posts: 29
Joined: Fri Sep 02, 2005 10:14 pm

Re: Thanks for the wizard

Post by ZMaster »

Polska12 wrote:Brilliant script, thank you very much.
Thank's, though the script is only a modified version of the default script template supplied by Microsoft.

By the way, if you're looking for a Dreamcast wizard, let me know. I created one which lets you use the Chankast emulator (unfortunatelly we don't have a working one for PSP, yet) or the Serial/BBA cable to test your software directly from inside MSVC.
Link: http://www.dcemu.co.uk/vbulletin/showthread.php?t=18817
Polska12
Posts: 3
Joined: Sun Feb 26, 2006 10:11 am

Possible buy in your script

Post by Polska12 »

Hey ZMaster I noticed with some of the tutorial coding example for the psp the little app provided that auto generates the makefile generates one that causes linker errors. I was wondering if you had the source and I could take a look. I'd pm you about this but I'm not certain how.
Polska12
Posts: 3
Joined: Sun Feb 26, 2006 10:11 am

Retraction

Post by Polska12 »

Actually I might just be dumb and spoke too soon, sorry Zmaster I found what I did wrong, dont' hold it against me. :-)
ssjason123
Posts: 1
Joined: Wed Mar 22, 2006 6:53 pm

Post by ssjason123 »

hey fish i had the same problem as you earlier with the Project creation failed

in the C:\Program Files\Microsoft Visual Studio 8\VC\vcprojects
there should be a file called VSWizardPSP.vsz


change the line in that file from
Wizard=VsWizard.VsWizardEngine.7.1
to
Wizard=VsWizard.VsWizardEngine.8.0

and that should let you create the projects.
User avatar
lokust
Posts: 22
Joined: Sun May 28, 2006 7:34 am

Post by lokust »

rasmus - Thank you for putting this together, its been really helpful, especially for a visual studio junky like myself.

Would it be possible to integrate gdb as well? If you could point me to any relevant docs I would appreciate it - currently wading through loads of msdn crap trying to find info.
dengyu_li
Posts: 1
Joined: Mon Jun 26, 2006 6:35 pm

PSP Movie Creator

Post by dengyu_li »

a new forum that i have never been here.

http://yaodownload.wordpress.com/
roger99
Posts: 2
Joined: Wed Aug 30, 2006 10:06 pm

Post by roger99 »

Hi.

After not coding for 10 years the PSP homebrew scene has re-sparked my interest in C and I'm currently trying to pickup where I left off. I have been using VS2005 as my IDE and this setup for the TOOLCHAIN, compiler and the libaries.

http://www.dcemu.co.uk/vbulletin/showthread.php?t=25564

I know every post here mentions using cygwin to get the Toolchain working through VS but I am wondering if the same thing can be done for this setup. Any help would be appreciated, as I'm not looking forward to the looong...... toolchain setup through cygwin which I've had no luck with in the past (being a total linux NooB doesn't help :-( ).

On a different note I'm looking for any PSP specfic code examples I can get my hands on. Anyone know where I could look other than sites like psp-programming.com etc.
RiZ
Posts: 1
Joined: Sun Oct 22, 2006 7:28 am

Post by RiZ »

I seem to be getting this error when I try building

as: unrecognized option `-G0'

I edited the msvc-cygwin-make file and added these two lines:

Code: Select all

set path=%path%;c:/cygwin/usr/local/pspdev/bin
set PSPSDK=c:/cygwin/usr/local/pspdev/sdk 
If I just go into cygwin and do:

Code: Select all

psp-gcc -G0 -Wall main.cpp 
it doesnt give me that error.

But its still complaining. Any suggestions?
RetroGamer
Posts: 11
Joined: Tue Nov 07, 2006 10:44 am

Post by RetroGamer »

I did everything exactly like the first post shows and I got this error message in Visual Studio:

"
/bin/bash: line 0: cd: /cygdrive/c/Program: No such file or directory
make: psp-config: Command not found
Makefile:12: /lib/build.mak: No such file or directory
make: *** No rule to make target `/lib/build.mak'. Stop.
Project : error PRJ0002 : Error result 2 returned from 'C:\WINDOWS\system32\cmd.exe'.
"

What is cygdrive? Is it the hard drive/partition that cygwin is installed under?
Post Reply