Help with error message

support for the powerpc toolchain
Post Reply
George
Posts: 4
Joined: Tue Sep 02, 2008 8:33 pm

Help with error message

Post by George » Sat Sep 06, 2008 5:34 pm

I have made a separate project folder as described in the devkitppc setup guide.

This has a source directory where I put my C files and then run make with programmers notepad.

If I put a file, e.g. template-tst3.c into this directory and open the project with programmers notepad it compiles and runs. If I rename the same file outside this directory to template-nw.c and copy it into this source directory I get the error:

linking ... helloworld.elf
d:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-gekko/4.2.3/../../../../powerpc-gekko/lib/crtmain.o: In function `__crtmain':
d:/projects/devkitPro/buildscripts/newlib-1.16.0/libgloss/rs6000/crtmain.c:18: undefined reference to `main'
collect2: ld returned 1 exit status
make[1]: *** [/d/devkit-dev/helloworld/helloworld.elf] Error 1
"make": *** [build] Error 2

What can cause this error message? I do not have a d:/projects/devkitPro... directory.

Edited:
The problem was: files with a capital C at the end will not run.

arronhuk
Posts: 3
Joined: Wed Sep 03, 2008 4:49 pm

Re: Help with error message

Post by arronhuk » Mon Sep 08, 2008 10:34 am

If you want it to cope with upper case .C extensions you could add a rule in your make file to make it. That way it wouldn't care what case it was in just get it to make the .C to a .o file ready for linking.

George
Posts: 4
Joined: Tue Sep 02, 2008 8:33 pm

Re: Help with error message

Post by George » Mon Sep 08, 2008 8:06 pm

I am not very familiar with make and also afraid the rule I insert may be gone with the next update of devkitpro.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest