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

Post your requests and ideas on the future development of mikroBasic for AVR.
Post Reply
Author
Message
OEP
Posts: 4
Joined: 08 Apr 2008 19:36
Location: near Dresden/Germany

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

#1 Post by OEP » 08 Apr 2008 19:55

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

OEP
Posts: 4
Joined: 08 Apr 2008 19:36
Location: near Dresden/Germany

#2 Post by OEP » 08 Apr 2008 19:59

oh sh...t wrong forum

Does the admin move this in the right one?


OEP

yo2lio
Posts: 1878
Joined: 19 Sep 2006 12:57
Location: Romania, Arad City
Contact:

#3 Post by yo2lio » 08 Apr 2008 20:48

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.
Best regards, Florin Andrei Medrea.

http://www.microelemente.ro/
http://www.microelemente.ro/produse-si-servicii/
http://www.microelemente.ro/custom-software/

mail : florin@microelemente.ro

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

#4 Post by filip » 09 Apr 2008 13:02

I have also tried it, and it compiles good...

Which version of mikroBasic for AVR are you using ?

OEP
Posts: 4
Joined: 08 Apr 2008 19:36
Location: near Dresden/Germany

#5 Post by OEP » 09 Apr 2008 17:58

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

OEP
Posts: 4
Joined: 08 Apr 2008 19:36
Location: near Dresden/Germany

#6 Post by OEP » 09 Apr 2008 19:27

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

Post Reply

Return to “mikroBasic for AVR Wish List”