#88406 - hmbg - Mon Jun 19, 2006 9:52 am
hi everyone
I'm new in ds development and just installed the devkitARM and libnds. I already modified a example source but when I 'make' it, there is the famous message: undefined reference to 'main'
when I compile all examples there are only 4 of them compiled and there is even this error, but a little bit different: "undefined reference to '__irq_vector'" and "undefined reference to '__irq_flags'"
I use Linux Debian and devkitARM 18
I searched the whole internet and this forum but I only found someone who says the problem causes on the wrong compiler. in the makefile, he says, I have to change the C-Compiler (gcc) to the C++-Compiler (g++), but I don't know where to do^^
ok, maybe someone can help me,
thx hmbg
#88425 - silent_code - Mon Jun 19, 2006 1:02 pm
hi!
you should be able to compile every example by installing devkitArm r18, libnds r18 and msys 1.0.10. the following directory structure is recommended:
c:\...\devkitPro
* devkitARM
* msys
* libnds
* others
install the latest r18 releases and you should be able to compile without problems. at least it works for me. :)
oh, i should mention that i use windows.
with r18 you'll be able to test most of your stuff on emulators and hardware. if you go for hw only, r19 might be better (i haven't used it myself, no hw, yet).
good luck!
EDIT:
[for windows:]
"Add the path to your msys bin folder to the start of the (windows) path - the default is c:\msys\1.0\bin. You can also add the path to the toolchain binaries here - c:\devkitPro\devkitARM\bin, c:\devkitPro\devkitPSP\bin and/or c:\devkitPro\devkitPPC\bin. Adjust the example(s) to reflect your own setup and ensure there is a ';' character between each path entered."
"Add a variable for DEVKITPRO as shown, adjusting the path to suit your installation. You should note that these variables are for use by the makefiles running through msys and should be unix format paths, using /c/ rather than c:/. In the same manner add variables for DEVKITARM ( /c/devkitPro/devkitARM)"
from the devkit pro page (article not available any more :( )
#88434 - hmbg - Mon Jun 19, 2006 2:26 pm
thank you for reply
I already installed devkitarm and libnds (I think you missunderstood me)
some of the examples are compiled, but not all
that means I think, its installed but something is missing or i have to do something, I dont know
thx hmbg
#88547 - silent_code - Tue Jun 20, 2006 3:45 am
oh, i know you installed it, just wanted to give you info so you can check if everything is installed ok.
i'm having no problems compiling any examples... but i'm using winXp :|
greets!
#88569 - wintermute - Tue Jun 20, 2006 9:41 am
hmbg wrote: |
hi everyone
I'm new in ds development and just installed the devkitARM and libnds. I already modified a example source but when I 'make' it, there is the famous message: undefined reference to 'main'
|
This one is caused by not having a main function in your source. With the standard templates this is usually caused by either placing your source files in the wrong place or not specifying the correct directories in the makefile.
Quote: |
when I compile all examples there are only 4 of them compiled and there is even this error, but a little bit different: "undefined reference to '__irq_vector'" and "undefined reference to '__irq_flags'"
I use Linux Debian and devkitARM 18
|
This one is due to using the latest libnds with an old toolchain - you need release 19+ ( currently 19a )
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog
#88573 - silent_code - Tue Jun 20, 2006 10:22 am
wintermute wrote: |
This one is due to using the latest libnds with an old toolchain - you need release 19+ ( currently 19a ) |
or more general: you need a fitting one. can't take an old (r18) devkit and a new (r19) lib because of incompatibility issues.
i don't recommend modifying the makefile because they work in the examples (at least for most of us). as winter said, make sure everything is in the right place (source, include, data...). it sounds odd, because you said some (not all) examples wouldn't compile.
#89273 - hmbg - Fri Jun 23, 2006 11:33 pm
Okay, thank you, that was this problem, but another one appears. (Sorry if I'm annoying you, I'm new ;-)
There seems to be an EABI Version difference between some files it says:" /path/to/file/file has EABI Version 0 but the target /path/to/another/file has EABI Version 4" or other Way around. Don't know what that is...
(Like I said before: I (want to) use Linux Debian)
thx hmbg
#89278 - josath - Sat Jun 24, 2006 12:03 am
maybe these tips will help:
1. (as above) make sure you are using the latest version of everything
2. do make clean; make -- basically recompile everything (including any libraries you use)
#89384 - silent_code - Sat Jun 24, 2006 5:30 pm
josath wrote: |
maybe these tips will help:
1. (as above) make sure you are using the latest version of everything
2. do make clean; make -- basically recompile everything (including any libraries you use) |
good one!
#89783 - waycious - Mon Jun 26, 2006 6:21 pm
I have a similar problem. When i installed palib it gave me an error while running some program after it installs... I dont remember what it was though i'm at work, i just was hoping to get a response before i got home. Also when i try and compile the examples i get something like there was an erro in each routine, and it says something like ***file.c: line 54 i dunno. If anyone knows what i should try. I'm using 19+ and devkit 1.3.1. If anyone can help me with this vague info that'd be cool, but i'll post in more detail when i get home
#89788 - wintermute - Mon Jun 26, 2006 6:32 pm
Hassle the palib people and get them to fix their broken library.
Why they chose to ignore a perfectly good build system and create their own is beyond me. It was guaranteed to fall apart once I got devkitARM supporting armv5 properly.
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog
#89801 - tepples - Mon Jun 26, 2006 7:23 pm
wintermute wrote: |
Why they chose to ignore a perfectly good build system and create their own is beyond me. |
I have found it difficult to handle assets and their multiple levels of dependencies using your makefile framework. The .nds file depends on a .gbfs file that is bin2o'd, which depends on .todbg files for backgrounds and sprite sheets, which in turn depend on .bmp files.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#89802 - waycious - Mon Jun 26, 2006 7:25 pm
so are u saying i can't use palib 19+? How can i get a working palib or fix my non working palib? After i install it i get an error at the beginning when the batch file runs automatically.
#89864 - wintermute - Tue Jun 27, 2006 1:39 am
tepples wrote: |
wintermute wrote: | Why they chose to ignore a perfectly good build system and create their own is beyond me. |
I have found it difficult to handle assets and their multiple levels of dependencies using your makefile framework. The .nds file depends on a .gbfs file that is bin2o'd, which depends on .todbg files for backgrounds and sprite sheets, which in turn depend on .bmp files. |
Send me a basic project that uses this structure and I'll have a look at the best way to handle the dependencies. Mostly it should be a matter of appropriate rules.
waycious wrote: |
so are u saying i can't use palib 19+? How can i get a working palib or fix my non working palib? After i install it i get an error at the beginning when the batch file runs automatically.
|
All libraries need to be rebuilt with the new toolchain. Since the palib people ignored the standardised structure they'll need to rewrite their build system to suit. In theory it should be a matter of changing ocurrences of arm-elf- to arm-eabi but, I did try one of their releases some time ago and it had several install errors even with release 17. I didn't bother to look at it further.
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog
#89869 - tepples - Tue Jun 27, 2006 2:24 am
wintermute wrote: |
tepples wrote: | wintermute wrote: | Why they chose to ignore a perfectly good build system and create their own is beyond me. |
I have found it difficult to handle assets and their multiple levels of dependencies using your makefile framework. The .nds file depends on a .gbfs file that is bin2o'd, which depends on .todbg files for backgrounds and sprite sheets, which in turn depend on .bmp files. |
Send me a basic project that uses this structure and I'll have a look at the best way to handle the dependencies. Mostly it should be a matter of appropriate rules. |
Sample of the maze of dependencies that go into a typical project:
Code: |
tod.gba: tod.bin bkgnds.gbfs bgm.gbfs samples.gbfs
tod.bin: tod.elf
tod.elf: src1.o src2.o src3.o src4.iwram.o
%.o: %.c
%.iwram.o: %.c
%.o: %.s
bkgnds.gbfs: bg1.lz bg2.lz bg3.lz
%.lz: %.todbg
%.todbg: %.bmp
samples.gbfs: sample1.8gbs sample2.8gbs sample3.8gbs
%.8gbs: %.wav
bgm.gbfs: music1.8gbm music2.8gbm music3.8gbm
%.8gbm: %.in
|
(Notice: the version of TOD currently on my web site is intended for much older toolchain.)
If and when I get time, I'll whip up a more basic demonstration of the problem in GBA mode using my own ad-hoc makefile framework, and we'll see if you can convert it to use your framework. But I can only handle 2 projects at a time, one being LOCKJAW (the sequel to TOD, currently being developed alongside discussion at tetrisconcept.com) and the other being an implementation of polymorphic index trees.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.