gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Compiling/Makefile/Environment Variables issues

#75123 - JessTicular - Fri Mar 10, 2006 8:31 am

Hello there,

Now, I've successfully set up and used my NDS dev environment quite a bit, but due to Uni work, etc, I haven't gotten to use it for the last 3ish months.

I whack open MinSys, dive over to a demo project that doublec wrote (demo1), run the makefile, and I get...

Code:
$ makefile
./makefile: DEVKITPRO: command not found
./makefile: DEVKITPRO: command not found
./makefile: all:: command not found
./makefile: arm7_main.o:: command not found
./makefile: NDSLIB_INCLUDE: command not found
arm7_main.cpp:6:17: error: nds.h: No such file or directory
arm7_main.cpp:14: error: 's32' does not name a type
arm7_main.cpp:15: error: 's32' does not name a type
arm7_main.cpp:16: error: 's32' does not name a type
arm7_main.cpp:17: error: 's32' does not name a type
arm7_main.cpp: In function 'void InterruptHandler()':
arm7_main.cpp:22: error: 'REG_IF' was not declared in this scope
arm7_main.cpp:22: error: 'IRQ_VBLANK' was not declared in this scope
... etc


Learning from my mistakes when I first started, I first went and checked that all my Environment variables were in-tact... Yep, sure enough, they're all still there, 100% unchanged. Great.
Next, I check that I haven't accidentally corrupted something with DevKitPro, so I reinstall the lot ( as well as MinSys ).
Ok, still not working...
Finally, I erased the Environment variables, and recreated them. One re-boot later, and there's no change... Still the same errors.

After many an hour of searching, I came across this thread with exactly the same issue, but that didn't help too much, even though the clever bugger solved it...

And about now, all I want to do is get back and keep making my Spider Solitair game!

Any and all help would be appreciated, thanks!

Jess.

PS, a quick run-down of my set-up

Directories:
C:\dsDev\devkitARM
C:\dsDev\libnds

Variables:
DEVKITARM: /c/dsDev/devkitARM
DEVKITPRO: /c/dsDev
PATH: C:\dsDev\msys\bin;C:\dsDev\devkitARM\bin

#75133 - doublec - Fri Mar 10, 2006 12:01 pm

Don't run make from within msys. I run it from a normal windows cmd.exe command prompt.

#75134 - JessTicular - Fri Mar 10, 2006 12:06 pm

Well smack me silly and hang me up to dry...

It works!

But, (here's a hum-dinger of a question) why did it work from within msys before, then after months of inactivity, it just stopped..?

*Shrug*
Must've gotten bored waiting and went on strike :)

Thanks Double, I can finally get back to it now.

Cheers Mate,
Jess.

#75332 - wintermute - Sun Mar 12, 2006 6:11 am

actually your error is staring you in the face.

Code:

$ makefile


I'm not quite sure why this is happening but what you've done here is attempt to execute the makefile as if it was a script and bash has quite happily obliged.

The correct command is make.
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog

#75364 - tepples - Sun Mar 12, 2006 3:59 pm

Or would this shebang line at the top of the makefile work?
Code:
#!/usr/bin/make -f

_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#75373 - wintermute - Sun Mar 12, 2006 4:29 pm

Only on systems where GNU make is named make unfortunately.

Being honest I'm not sure why people are still using a shell to run their makefiles anyway.

http://www.devkitpro.org/devstudio.shtml
http://www.devkitpro.org/ultraedit.shtml
http://www.devkitpro.org/pn2.shtml
http://www.devkitpro.org/visual-c++-express.shtml

All the examples provided even come with a project file for PN2.
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog

#75377 - tepples - Sun Mar 12, 2006 4:47 pm

wintermute wrote:
Being honest I'm not sure why people are still using a shell to run their makefiles anyway.

Because some visual or sound artists on teams don't touch code and thus don't want to load PN2. For them, the edit-compile-test cycle is change the image or audio files using an image or audio editor, run the makefile, and check the project in an emulator or on hardware.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#75592 - cory1492 - Tue Mar 14, 2006 1:52 pm

I personally find it simpler to leave a shell window open (so I press the up arrow to use the history commands which are normally make and make clean) and edit the files outside of a structured IDE type application, using a (free) simple syntax hilight editor called notepad2. Not that I dont like IDE's and PN2, I just dont like having everything that is open indexed in a single window when I already have a taskbar taking up space in windows.