Page 1 of 1

Get Error 0:0 E-0 Linker error: Routine not found: main

Posted: 08 Apr 2008 19:55
by OEP
Hello at all,

i try to build a little prog for a atmega8, but i become every time the error like in the subject. I would like realize a PWM without the PWM_library. Here is my code:

[code]
program PWM

sub procedure wait
Delay_ms(200)

end sub

DIM I AS WORD
MAIN:
DDRB.1 = 1
TCCR1A = $83
TCCR1B = $01
I = 1

while true

FOR I = 0 to 255
OCR1AL = I
wait
NEXT I
wend
end.[/code]

Once the translation has already works successfully and was also successfully transferred to the uC.


Thanks for Help

Best regards
OEP

Posted: 08 Apr 2008 19:59
by OEP
oh sh...t wrong forum

Does the admin move this in the right one?


OEP

Posted: 08 Apr 2008 20:48
by yo2lio
No problem ....

This code compile ok at me:

Code: Select all

program PWM

dim i as word

sub procedure wait
 Delay_ms(200)
end sub

main:
  DDRB.1 = 1
  TCCR1A = $83
  TCCR1B = $01
  i = 1
  while true
    for i = 0 to 255
      OCR1AL = I
      wait
    next I
  wend
end.

Posted: 09 Apr 2008 13:02
by filip
I have also tried it, and it compiles good...

Which version of mikroBasic for AVR are you using ?

Posted: 09 Apr 2008 17:58
by OEP
Hello,

i using the latest version of Mikrobasic for AVR (4.0.2). Today i tried again with a new Project and the same code and the same Problem emerged. I don't understand that. Could the problem connected with Windows Vista?

OEP

Posted: 09 Apr 2008 19:27
by OEP
I think i've solved the problem.

It is not a problem of mikrobasic or vista, it is a problem of my self. i had some problems with the project structure of mikrobasic but i think i have understand this now.

Nevertheless thanks at all

OEP