Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
21615 Discussions

Niosii error message

Altera_Forum
Honored Contributor II
1,325 Views

Hi everybody, I am a newbie in nios ii and I had this problem when compile a simple code on Nios ii 

 

make -s all includes  

Linking light.elf... 

/cygdrive/d/DE2Prepare/OlderVerAgain/software/light_syslib/Debug/liblight_syslib.a(alt_main.o)(.text+0x34): In function `alt_main': 

/cygdrive/c/altera/90/nios2eds/components/altera_hal/HAL/src/alt_main.c:163: undefined reference to `main' 

collect2: ld returned 1 exit status 

make: *** [light.elf] Error 1 

Build completed in 10.5 seconds 

 

I tried and tried again but I have the same message above. Please help me, thanks so much.
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
590 Views

did you define a main() function in your project, and is that function in a .c file that is actually compiled?

0 Kudos
Reply