forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to compile, link and transfer PSP programs from VS.NET
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
RetroGamer



Joined: 07 Nov 2006
Posts: 11

PostPosted: Wed Nov 08, 2006 2:12 pm    Post subject: Reply with quote

I followed the instructions word by word, and I get this error message in Visual Studio:

"
/vs-pspdev.sh: line 4: cd: /cygdrive/c/Program Files/Microsoft Visual Studio/MyProjects/RPG Engine/14 PSPDEV/PSPDEV: No such file or directory
make: *** No targets specified and no makefile found. Stop.
"

That is a directory on my hard drive and there is a makefile under the PSPDEV directory. I don't know why it isn't finding anything.
Back to top
View user's profile Send private message
Riekistyx



Joined: 18 Mar 2006
Posts: 14

PostPosted: Sun Apr 22, 2007 5:59 am    Post subject: Reply with quote

Warren wrote:
I came up with a better solution tonight that doesn't require you to add anything to visual studio or change your makefiles. Just make the following scripts to your c:\cygwin directory and modify paths as needed:

vs-pspdev.bat
Code:
@c:\cygwin\bin\bash -c 'export VS_PATH=`pwd`; /bin/bash --login -c "/vs-pspdev.sh %1 %2 %3 %4 %5"'


vs-pspdev.sh
Code:
#!/bin/bash
export PSP_MOUNT=/cygdrive/i
export PATH=$PATH:/cygdrive/p/pspdev/bin
cd "$VS_PATH"
make 2>&1 $@ | sed -e 's/\([^:]*\):\([0-9][0-9]*\)\(.*\)/\1 (\2) \3/'


Then in VS, make a new makefile project and specify "c:\cygwin\vs-pspdev.bat "as make command, "c:\cygwin\vs-pspdev.bat clean" as clean command and "c:\cygwin\vs-pspdev.bat clean all" as rebuild and voila, you're rocking in VS.net with minimal fuss.



here is what i have in my output window
cygwin is on my D drive

here is my batch file
Code:

@d:\cygwin\bin\bash -c 'export VS_PATH=`pwd`; /bin/bash --login -c "/vs-pspdev.sh %1 %2 %3 %4 %5"'


here is that sh file thing

Code:

#!/bin/bash
export PSP_MOUNT=/cygdrive/i
export PATH=$PATH:/cygdrive/p/pspdev/bin
cd "$VS_PATH"
make 2>&1 $@ | sed -e 's/\([^:]*\):\([0-9][0-9]*\)\(.*\)/\1 (\2) \3/'




Output window gives me this
Performing Makefile project actions
/vs-pspdev.sh: line 4: cd: /cygdrive/d/Documents/Visual Studio/Vs2003/Psptest/psptest: No such file or directory
make: *** No targets specified and no makefile found. Stop.

How do I do this lol.... I'm a idiot....
now.. in this nmake project is it possible to add "include directories to the project?"
because i have visual assist. it will show up function parameters and comments in the psp sdk... but if i add pspsdk (to my includes) and point it out as a include for global all other projects bitch at all the linux specific stuff in the code.

Please help me. I want to do more than hello world but i want to do it with ease. =o
_________________
LOL @ linux users
Back to top
View user's profile Send private message Send e-mail AIM Address
StrmnNrmn



Joined: 14 Feb 2007
Posts: 46
Location: London, UK

PostPosted: Sun Jul 29, 2007 12:16 am    Post subject: Reply with quote

Riekistyx wrote:

Output window gives me this
Performing Makefile project actions
/vs-pspdev.sh: line 4: cd: /cygdrive/d/Documents/Visual Studio/Vs2003/Psptest/psptest: No such file or directory
make: *** No targets specified and no makefile found. Stop.


You've probably solved this by now. I've spent the last two hours banging my head off my keyboard with the same issue so I thought I'd share in case anyone else has the same issue.

Basically check that your line endings are Unix-stylee (i.e. just LF) in whichever text editor you're using. I copied and pasted the text from this forum and it seems cd was treating the trailing carriage return char as a part of the path. Resaving the script after normalising the line endings sorted it for me.

It's crazy that we still have to waste time with stuff like this in 2007...

-StrmnNrmn
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Overseer



Joined: 13 Nov 2007
Posts: 3

PostPosted: Wed Nov 14, 2007 12:41 am    Post subject: Reply with quote

I've been trying to get this to work myself. I've been doing alright with the cygwin method, but I'm a pretty big fan of .NET since I use it at the office and am familiar with it, but if I have to go back to EditPlus, then so be it.

Anyway, I've figured it out until the point where I go to build. I get errors that, when I looked them up, seem to be syntax errors in the SDK. For example:

Code:
error C2086: 'int __inline__' : redefinition    C:\cygwin\usr\local\pspdev\psp\sdk\include\psptypes.h(68) : see declaration of '__inline__'


In C++, it's true, that is invalid. But in C, this is okay. Basically, I can't figure out how to mix C++((which is what my main code is written in)) and C in VC++.NET 2003.

If anyone could point me in the right direction, I would greatly appreciate it.

Thanks,
CR
Back to top
View user's profile Send private message
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Wed Nov 14, 2007 5:17 am    Post subject: Reply with quote

I don't get it, what's that error coming from? That doesn't look like a gcc error. Are you trying to compile PSP programs with MSVC?
Back to top
View user's profile Send private message
Overseer



Joined: 13 Nov 2007
Posts: 3

PostPosted: Thu Nov 15, 2007 5:16 am    Post subject: Reply with quote

Ha, yeah that's not what I was trying to do, but I guess I didn't realize that that was what the IDE was trying to do. As soon as I read that I checked that angle. Went through the process again and this time I was able to get it to work more in the right direction, though now I'm getting this.

Code:
Performing Makefile project actions
vs-psp-g++ -I. -IC:/cygwin/usr/local/pspdev/psp/sdk//include -O2 -G0 -Wall -I. -IC:/cygwin/usr/local/pspdev/psp/sdk//include -O2 -G0 -Wall -fno-exceptions -fno-rtti   -c -o main.o main.cpp
make: vs-psp-g++: Command not found
make: *** [main.o] Error 127
Make : error PRJ0002 : error result returned from 'c:\docume~1\lonest~1\locals~1\temp\bat000008.bat'.
Back to top
View user's profile Send private message
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Thu Nov 15, 2007 6:17 am    Post subject: Reply with quote

Sounds like you missed steps 2 and 3 on the first post in this thread.
Back to top
View user's profile Send private message
Overseer



Joined: 13 Nov 2007
Posts: 3

PostPosted: Thu Nov 15, 2007 1:46 pm    Post subject: Reply with quote

No I did them all, in fact, just to make sure. I just got finished installing cygwin, newest toolchain, and then tried these steps again on a fresh machine and I still get the same error.

Now I may of completed the steps incorrectly, but I definately did them. Only one I may of messed up would be #2. It's entirely possible that I just don't know how to make a shell script. I figured it was just a text file that you put in that directory with that name and that code inside of it.

Is there something special you have to do in that respect?

peace,
CR

EDIT: Also, when I run vs-psp-gcc or vs-psp-g++ I get this:

Code:
LonestarF1@Lonestar /usr/local/pspdev/bin
$ ./vs-psp-g++
sed: -e expression #1, char 46: unknown option to `s'

LonestarF1@Lonestar /usr/local/pspdev/bin
$ sed --version
GNU sed version 4.1.5
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,
to the extent permitted by law.


I included the sed version just in case it'd help.
Back to top
View user's profile Send private message
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Fri Nov 16, 2007 8:04 am    Post subject: Reply with quote

The line
Code:
make: vs-psp-g++: Command not found
shows that vs-psp-g++ cannot be executed by the makefile. Maybe the PATH environment when running from VS is not the same as the PATH when you're running it manually from the shell.

The error
Code:
sed: -e expression #1, char 46: unknown option to `s'
indicates that the contents of your vs-psp-g++ script are incorrect.
Back to top
View user's profile Send private message
victorprosa



Joined: 14 Jan 2009
Posts: 38

PostPosted: Sat Jan 30, 2010 9:16 pm    Post subject: Reply with quote

Sorry for bumping this thread...

But I am trying to compile pmpmod myself...

I had to patch a lot of suff on it's shared libs, but i managed to get them working (maybe i send them to ps2dev svn later), the problem is that i am not able to compile the main program:

Code:
make[1]: vs-psp-gcc: Command not found


Seems that the original coder used to use VS.NET for his homebrews, cool...
but I use linux with ps2dev's PSPSDK, and there's no tutorial for adding this command to my system, this topic just gives a solution for windows users...
How could I solve this problem in linux systems?
Back to top
View user's profile Send private message Send e-mail
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Sun Jan 31, 2010 2:02 am    Post subject: Reply with quote

Either use the vs-psp-gcc script provided in this thread or just use psp-gcc instead... this isn't hard :)
Back to top
View user's profile Send private message
jcyuan



Joined: 21 Jan 2010
Posts: 4

PostPosted: Sun Jan 31, 2010 2:09 pm    Post subject: Reply with quote

just nice work.
it works fine. thanks!
_________________
oops
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group