#22716 - Op Ivy - Sun Jun 27, 2004 9:03 pm
First off, I'm very new to this, so if this is a real dumb question, which it probably is, sorry.:) Anyways, I've been trying to get apex up and working, just to compile one of the examples is all I want to do at the moment, but I'm having a hell of a hard time. I'm using the devkitadv and I've gone through running conv2aas, but my problem is the make file. The one originially with the program doesn't run at all. So I tried to make another one, pretty simply straight forward bat file I'd think would work. Here it is -
path=C:\devkitadv\bin
gcc -o -LLibAAS -lAAS -ILibAAS AASExample.elf AASExample.cpp -lm
objcopy -O binary AASExample.elf AASExample.bin
The path is right, it is a .cpp file so no dumb mistake there ;) and the only error message I get is this.
C:\DevKitAdv\AASExample>gcc -o -LLibAAS -lAAS -ILibAAS AASExample.elf AASExample.cpp -lm
gcc: AASExample.elf: No such file or directory
C:\DevKitAdv\AASExample>objcopy -O binary AASExample.elf AASExample.bin objcopy: AASExample.elf: No such file or directory
So I'm confused on what that even means.. I was under the impression that the elf file is one of the files the compiler was making. (yes I know, I know nothing about make files and what not yet heh)
Thanks in advance for any help,
Brian
#22720 - jd - Sun Jun 27, 2004 9:51 pm
Op Ivy wrote: |
I'm using the devkitadv and I've gone through running conv2aas, but my problem is the make file. The one originially with the program doesn't run at all. So I tried to make another one, pretty simply straight forward bat file I'd think would work.
|
Rather than making a new makefile, it might be better to try and figure out why the provided one didn't work.
Op Ivy wrote: |
C:\DevKitAdv\AASExample>gcc -o -LLibAAS -lAAS -ILibAAS AASExample.elf AASExample.cpp -lm
gcc: AASExample.elf: No such file or directory
|
The error message is because you're trying to compile AASExample.elf, which doesn't exist. You should get rid of "AASExample.elf" in the line above, and add "AASExample.o" after "-o" option. Then, you'll need to add a step to link AASExample.o to crt0.o and AAS_Data.o, after assembling them first.
Op Ivy wrote: |
So I'm confused on what that even means.. I was under the impression that the elf file is one of the files the compiler was making. (yes I know, I know nothing about make files and what not yet heh)
|
The procedure goes roughly as follows:
1) Compile/assemble all the .c/.cpp/.s files in your project (in this case, that means AASExample.cpp, crt0.s and AAS_Data.s) using gcc/g++/as as appropriate. This will produce a corresponding object (.o) file for each input file.
2) Link them together (I recommend using gcc rather than ld to do this as it will automatically include the relevant libraries). This will produce a single .elf file.
3) Convert this to GBA format using objcopy.
It would be much easier to just use the makefile provided. How exactly does it go wrong? What error message do you get if you "cd" to the right folder and type "make"?
#22879 - Op Ivy - Wed Jun 30, 2004 7:00 pm
Thanks for the reply JD (sorry for my late response). My only problem with the make file supplied is typing make in the command line when in the directory doesn't run it. It did awhile back, but no longer does (have no clue why). Thats why I was trying to get a make.bat to work, since that I can execute in the command line.
(windows 2000 server, but makefile should compile fine I know, however it doesn't. :( )
#22881 - jd - Wed Jun 30, 2004 7:48 pm
Op Ivy wrote: |
Thanks for the reply JD (sorry for my late response). My only problem with the make file supplied is typing make in the command line when in the directory doesn't run it. It did awhile back, but no longer does (have no clue why).
|
What error do you get when it fails? Are you running it from the devkitadv/cygwin shell or just a standard DOS prompt? (The latter almost certainly won't work.)
#22883 - Op Ivy - Wed Jun 30, 2004 7:59 pm
I've been running it off of devkitadv and it simply hangs. I'll reinstall devkit shortly and see if that fixes that part of my problem though and let you know.
Again, thanks for helping me, I really appreciate it.
#22890 - Op Ivy - Wed Jun 30, 2004 9:00 pm
Reinstalled DevkitAdv and cygwin, and now when I go to the directory with the make file and type make it says does not exist. o.o I think I'm just clueless when it comes to this stuff.. the programming I can do fine its these damn make files ;p
Last edited by Op Ivy on Wed Jun 30, 2004 9:19 pm; edited 2 times in total
#22892 - jd - Wed Jun 30, 2004 9:23 pm
Op Ivy wrote: |
Reinstalled DevkitAdv and cygwin, and now when I go to the directory with the make file and type make it says does not exist. |
That's pretty weird. What does it say it can't find? The make executable, the makefile or something else? What version of devkitadv are you using? (You could try downloading the latest version to see if that fixes the problem.)
#22896 - Op Ivy - Wed Jun 30, 2004 10:05 pm
Yeah I didn't have an up to date one it seems. Still not having much luck though. Tried using the sh.exe with devkit but it pretty much does the same thing, make won't work. . makefile will execute the file but then its just a whole mess of errors of things not found so I'm guessing thats not the way to do it. Closest I can get to running it is if I put the make file that comes with devkit in the same directory in the directory with the makefile and then go to windows command and type in make. Then I get -
rm -f *.o AASExample.gba AASExample.tmp symbols.h map.out process_begin: CreateProcess((null)), rm -f *.o AASExample.gba AASExample.tmp symbols.h map.out, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [clean] Error 2
So I doubt I'm supposed to compile the program in this way, but this is as close as I have gotton to get it to work. I don't know, I can get programs I make onto the gameboy just fine with .bats, but makefiles I can't get to run for the life of me.. Is there any good documents I could get pointed to on running them in devkitadv?
#22898 - tepples - Wed Jun 30, 2004 10:22 pm
Op Ivy wrote: |
Tried using the sh.exe with devkit but it pretty much does the same thing, make won't work. . makefile will execute the file but then its just a whole mess of errors of things not found so I'm guessing thats not the way to do it. |
Please paste them.
Quote: |
rm -f *.o AASExample.gba AASExample.tmp symbols.h map.out process_begin: CreateProcess((null)), rm -f *.o AASExample.gba AASExample.tmp symbols.h map.out, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [clean] Error 2 |
That's because 'rm' is a UNIX command, roughly corresponding to DOS's 'del'. It was easier back in the Real DOS days, when DJGPP didn't have this artificial distinction between Cygwin (UNIX API emulation) and MinGW (native Win32) environments created by the Cygwin license, and one could just install GNU Fileutils ('ls', 'rm', etc) into the PATH. Has anybody tried to build GNU Fileutils in PW32, a port of DJGPP's POSIX layer to Windows?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#22903 - Op Ivy - Wed Jun 30, 2004 10:35 pm
Ok, these are the errors running the sh file in the tool folder and running .makefile
all:: command not found
install:: command not found
clean:: command not found
all-xframe:: command not found
PATH: command not found
make: No such file or directory
install-xframe:: command not found
PATH: command not found
make: No such file or directory
clean-xframe:: command not found
PATH: command not found
make: No such file or directory
#22912 - jd - Thu Jul 01, 2004 12:49 am
Are you sure you're launching devkitadv correctly? I just tried this out with devkitadv-r5-beta-3 as shown below and it worked perfectly:
1) Open the devkitadv folder in windows explorer. On my installation, this is "C:\devkitadv-r5-beta-3".
2) Double click on the icon called "DevKit-Advance-R5-Beta-3" to launch command prompt.
3) In the command prompt, "cd" to the AASExample directory.
4) Type "make".
Is this exactly how you did it when you got the error messages?
Last edited by jd on Thu Jul 01, 2004 1:30 am; edited 1 time in total
#22916 - Op Ivy - Thu Jul 01, 2004 1:08 am
Yeah, I'm trying to reinstall Make on my computer, see if that fixes it or not. Hopefully it will
#22919 - Op Ivy - Thu Jul 01, 2004 1:44 am
Bah I can't get it to work for the life of me. To get the Make files to work what do I all need? (if I simply type make, all i get is unknown command) Is devkitadv enough to run it on its own in the command line originaly or do I need the GNU make installed onto my computer? (why I'm having a hard time getting back on cywin, thought I'd try it that way).
#22920 - jd - Thu Jul 01, 2004 1:53 am
Op Ivy wrote: |
Bah I can't get it to work for the life of me. To get the Make files to work what do I all need? (if I simply type make, all i get is unknown command) Is devkitadv enough to run it on its own in the command line originaly or do I need the GNU make installed onto my computer? (why I'm having a hard time getting back on cywin, thought I'd try it that way). |
devkitadv-r5-beta-3 comes with make. Is this the version of devkitadv you're using? Are you launching it exactly as I described above?