stdio.h can not be added to mickroC pro

Post your requests and ideas on the future development of mikroC PRO for AVR.
Post Reply
Author
Message
Rusbel
Posts: 1
Joined: 10 Sep 2017 16:04

stdio.h can not be added to mickroC pro

#1 Post by Rusbel » 10 Sep 2017 16:53

Hi there,

I need help trying to download and install stdio.h library on my mikroC pro, because I am unable to use features like declaring int,chart, float,etc. When I write down #include <avr/io.h> on my program and then trying to building it, the first error that comes out pointing it is this! .It Looks like some library is missing in my fully license mikroC (for AVR 32) development environment.
Attachments
Doc1.docx
(202.01 KiB) Downloaded 157 times

User avatar
lana.arsic
mikroElektronika team
Posts: 1715
Joined: 15 Jan 2016 12:50

Re: stdio.h can not be added to mickroC pro

#2 Post by lana.arsic » 11 Sep 2017 16:31

Hi,

Welcome to the MikroE forum.

You will need to define variables before main function
or at the beginning of main function.

Also, since name 'z' is already used, you can try to modify your code
for example on this way:

Code: Select all

unsigned int z1;
void main() {
  DDRB = 0xFF;           // Set direction to be output
  while(1){
      PORTB = 0xAA;
      for(z1 = 0; z1 < 200; z1++){
          PORTB = ~PORTB;
          delay_ms(1000);
      }
  }
}
You can include files from Include folder in the installation folder of the compiler,
which is located in for example:

c:\Users\Public\Documents\Mikroelektronika\mikroC PRO for AVR\Include\

When you are using file which is not in Include folder,
you can include them manually with specified path,
you can take a look in Help file for File Inclusion.

Kind regards,
Lana

Post Reply

Return to “mikroC PRO for AVR Wish List”