This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Installation error
- To: "GCC Help" <gcc-help at gcc dot gnu dot org>
- Subject: Installation error
- From: "Ramiro Polo" <rapocol at etsii dot upv dot es>
- Date: Thu, 26 Jul 2001 10:18:00 +0200
Hi,
I have the GNU compiler gcc, version 2.7-97r1a from Cygnus.
This software is supplied with the EVB7045F ( Evaluation Board ) of Hitachi
on a CD-ROM.
My host system is a PC(Pentium 166 MMX) with Windows 98 and the target
system is the evaluation board for the SH7045F microcontroller.
I followed the installation notes, and then, in the last procedure, when I
type 'make' in the demo folder to confirm that the GNU tools are correctly
installed, the demo work correctly until Hello World 9.
Then appears the next text:
gcc -c -O -g flash.c
ld -o flash.x flash.o -Tflash.cmd
flash.o: In function 'main':
flash.c:31: undefined reference to '__main'
make.exe: *** [flash.x] Error 1
What is the problem?
I have another question:
I define a C program with float variables.For example:
int main(void)
{
float a,b;
a = 5.23/1024;
b = a * 3.02;
.
.
}
When I compile the program with gcc, and then link the program with ld then
appears error like ' undefined reference to muldf3'.
If I compile and link directly with gcc the error don't appear.
I need to put the program at a certain memmory position. (Using
the -Tfile.lnk option of the ld program).
Can I do this directly with gcc?
Than you for your attention.
Best regards.
********************************************
Ramiro Polo Collado
Instituto de Tecnología Eléctrica
Universidad Politécnica de Valencia
Edificio Institutos 2
C/.Camino de Vera s/n
46022 Valencia (Spain)
Tel : 96 387 91 18
Fax :96 387 91 19
********************************************